/ Published in: jQuery
URL: http://www.dropthenerd.com/close-fancybox-on-form-submit-but-before-processing-via-ajax/
Expand |
Embed | Plain Text
$("#MyForm").live('submit',function(){ var params = $(this).serialize(); var self = this; $.ajax({ type: 'POST', url: self.action, data: params, beforeSend: function(){ alert('Closing'); $.fancybox.close(); }, success: function(data){ alert('Finished processing form'); return false; }, dataType: 'json' }); return false; }); }
You need to login to post a comment.
