.fancybox is not being recognised as a function

左心房为你撑大大i 提交于 2019-12-12 01:36:40

问题


I've gone through the other solutions to this question and none seem to work. I still think there is a problem with the scripts. Here is my :

<head>
    <meta charset="UTF-8">

    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1, minimal-ui" />

    <!-- JQuery -->
    <script src="js/jquery-1.11.3.js"></script>

    <!-- BS -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />

    <!-- Fancybox -->
    <script type="text/javascript" src="fancybox/jquery.easing-1.3.pack.js"></script>
    <script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
    <script type="text/javascript" src-"fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="style.css">

    <script>
        $(document).ready(function() {      
            if(location.hash) {
                $(location.hash).click();
            }
            $(".iframe").fancybox();
        });
    </script>

</head>

And body:

<a class="iframe" href="https://player.vimeo.com/video/151002965">
    <img src="https://vimeo.com/151002965">
</a>

回答1:


it have some type mistake

<script type="text/javascript" src-"fancybox/jquery.fancybox-1.3.4.pack.js"></script>

please correct it as,

<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"></script>

try once again it may help you



来源:https://stackoverflow.com/questions/34789460/fancybox-is-not-being-recognised-as-a-function

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