Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. $('#mySubmitForm').submit( function() {
  2. var form = $(this);
  3. $.post(
  4. form.attr('action'),
  5. form.serialize(),
  6. success: function( response ) {
  7. // do shizzle when submit succeeds...
  8. form.addClass('success');
  9. },
  10. failure: function( respones ) {
  11. // do shizzle when submit fails...
  12. form.addClass('error');
  13. }
  14. );
  15. return false;
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement