Advertisement
thenadz

AJAX Email Script

Nov 1st, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ajaxEmail() {
  2.     $('form#email').submit( function(){
  3.         $.ajax({
  4.                 type:       $('form#email').attr('method'),  
  5.                 url:        $('form#email').attr('action'),
  6.             data:       $('form#email').serialize(),
  7.                 success:    function(data) {
  8.                 $('#email-response').css('display','block');
  9.                     $('#email-response').html(data);
  10.                 }
  11.             });
  12.             return false;
  13.     });
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement