Archive for jquery

Programmatically close Fancybox

jquery how to and tipsThis might be my shortest post, but since I first read about 10 other ways to do this – none of which worked, and were quite complex – I decided even the simplest of things, if valuable, deserve their own post.

Jquery Fancybox can be found here Fancybox site.  From their website, Fancybox is defined as:  

“FancyBox is a tool for displaying images, html content and multi-media in a Mac-style “lightbox” that floats overtop of web page.”

This is a Jquery Fancybox tip on how to programmatically close the Fancybox. And this is all that is needed to be called in your javascript:

$.fancybox.close();

This assumes that there is already a Fancybox that is open!

Enjoy coding!