Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#mySubmitForm').submit( function() {
- var form = $(this);
- $.post(
- form.attr('action'),
- form.serialize(),
- success: function( response ) {
- // do shizzle when submit succeeds...
- form.addClass('success');
- },
- failure: function( respones ) {
- // do shizzle when submit fails...
- form.addClass('error');
- }
- );
- return false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement