jquery fancybox - prevent close on click outside of fancybox

后端 未结 15 985
独厮守ぢ
独厮守ぢ 2020-12-16 18:15

I\'m using the Fancybox plugin for my modal windows. It seems like no matter what options I use I can\'t prevent the fancybox modal window from closing when the user clicks

15条回答
  •  抹茶落季
    2020-12-16 18:32

    Set the closeClick parameter to false inside your function:

    $(".video").click(function() {
        $.fancybox({
            width: 640,
            height: 385,
            helpers: { 
                overlay: {
                    closeClick: false
                }
            }
        });
    
        return false;
    });
    

提交回复
热议问题