Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#send-form').submit(function(e){
- e.preventDefault()
- var name = $('[name="name"]').val(),
- phone = $('[name="phone"]').val()
- $.ajax({
- data: {action: 'ajax_order', name:name, phone: phone},
- type: 'post',
- url: "/wp-admin/admin-ajax.php",
- success: function(data) {
- alert(data); //should print out the name since you sent it along
- }
- });
- })
Add Comment
Please, Sign In to add comment