fancybox bug with trigger click

前端 未结 4 1173
孤城傲影
孤城傲影 2020-11-28 15:26

I have to run fancybox with trigger click in my website, the problem that i discovered is that with this method if you click on elements in

4条回答
  •  囚心锁ツ
    2020-11-28 15:47

    I don't know it will be helpful or not just try this,

    $(document).ready(function(e)
    {
    e.preventDefault();   
                $('#a1').fancybox({ 
                    afterClose: function()
                    {
                        console.log('closed :( ');
                    }
                }).click();// or .trigger('click');
    
    });
    

提交回复
热议问题