Posted By

dropthenerd on 01/27/11


Tagged

form jquery submit fancybox


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

virendrakryadav


Close a fancybox when you submit a form


 / Published in: jQuery
 

URL: http://www.dropthenerd.com/close-fancybox-when-you-submit-a-form-revisited

  1. /* Close the fancybox when you submit a form
  2.  */
  3. $('#myform').submit(function(){
  4. $.fancybox.close();
  5. return false;
  6. });
  7.  
  8. /* Here's another approach,
  9.  * but this time we're tied to the submit button
  10.  */
  11.  
  12. $('#submit_button').click(function(){
  13. $.fancybox.close();
  14. return false;
  15. });

Report this snippet  

You need to login to post a comment.