Auto load fancybox using .trigger('click')

别说谁变了你拦得住时间么 提交于 2019-12-01 08:24:16

I got the same problem. Testing with the unpacked version, i got "loading is undefined" in line 36 (fancybox 1.3.4). So I called "$.fancybox.init();" before triggering and it works correctly now.

Nope th reason is because the fancybox.js is included twice this is the file that has the core of fancy box

I've managed with the similar case in the way like this:

$(".some_wrapper").on('click', function(){
    var lnk = $(this).find("a").first();
    if (hr && ~cls.indexOf("fancybox-a")) {
        $.fancybox(lnk);
    }
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!