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
本文介绍了如何在Fancybox版本2.x中通过设置选项来禁用点击内容区域和覆盖层时关闭弹窗的功能,确保只有通过点击关闭按钮才能关闭Fancybox。
336

被折叠的 条评论
为什么被折叠?



