/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Close the fancybox when you submit a form */ $('#myform').submit(function(){ $.fancybox.close(); return false; }); /* Here's another approach, * but this time we're tied to the submit button */ $('#submit_button').click(function(){ $.fancybox.close(); return false; });
URL: http://www.dropthenerd.com/close-fancybox-when-you-submit-a-form-revisited