FancyBox Iframe not closing second time

。_饼干妹妹 提交于 2019-12-01 13:20:06

If you are using fancybox v2.x, then you don't need the (obsolete) options (v1.3.4) in your script. You could rather do

1). Set your html like

<a class="fancybox" href="http://vimeo.com/123456">

... removing the special class fancybox.iframe

2). Add the helpers media js file like :

<script type="text/javascript" src="../helpers/jquery.fancybox-media.js"></script>

... set your path accordingly

3). use this script

jQuery(document).ready(function ($) {
    $('.fancybox').fancybox({
        helpers: {
            media: {}
        }
    });
});

... and save yourself some headaches.

See JSFIDDLE

You could add some more API options if you need them. Check http://fancyapps.com/fancybox/#docs for the options of v2.x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!