For version 2.x use
$(".fancybox").fancybox({ closeClick : false, // prevents closing when clicking INSIDE fancybox helpers : { overlay : {closeClick: false} // prevents closing when clicking OUTSIDE fancybox } });
if closeClick
is set to true
(default) fancybox will close if clicking over the content so with these two combined options the only possible way to close fancybox is with the close
(X) button
hideOnOverlayClick
and hideOnContentClick
are options for Fancybox v1.3.x