So a long time ago in another mindset I wrote about how you could close a fancybox when you submit a form by basically removing any trace of the fancybox on the page – I’ve decided that’s not a very good approach. So heres, my new approach.
As you can see, there’s not as much code, which is always nice, but it’s also much more direct.
To build on this, here’s an example of submitting the form via ajax and closing the fancybox on success.
Hope these help you out when you’re building your next user friendly experience and having fun with jquery and fancybox!