0

我已按照此处的说明进行操作:fancybox 2.0.4 和 Vimeo尝试将视频作为灯箱打开,但我仍然无法让花式框工作。有任何想法吗?

带有视频的页面:http: //kodiakgroup.com/clients.php

HTML:

<div class="lightbox-client" style="margin-right: 20px;">
                            <a href="http://player.vimeo.com/video/65867546?title=0&amp;byline=0&amp;portrait=0" class="lightbox"><img src="/images/thumb-video-carlton.jpg" /><br /><br />Carlton-Bates</a>
                        </div>
                        <div class="lightbox-client">
                            <a href="http://player.vimeo.com/video/65867545?title=0&amp;byline=0&amp;portrait=0" class="lightbox"><img src="/images/thumb-video-arris.jpg" /><br /><br />Arris</a>
                        </div>

底部附近的Javascript:

<!--script for lightbox-->
                        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
                        <script type="text/javascript" src="/js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
                        <script type="text/javascript" src="/js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
                        <link rel="stylesheet" type="text/css" href="/js/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
                        <script type="text/javascript">
                            $(document).ready(function() {
                                $(".lightbox").fancybox({
                                    width: 400,
                                    height: 225,
                                    type: 'iframe',
                                    fitToView : false
                                });
                            });
                        </script>

错误:

Uncaught TypeError: Cannot read property 'msie' of undefined jquery.fancybox-1.3.4.pack.js:18
Uncaught TypeError: Object [object Object] has no method 'fancybox'
4

1 回答 1

0

错误是:Uncaught TypeError: Object [object Object] has no method 'fancybox'

删除 1 个 jQuery 实例(您正在加载它两次)并按以下顺序加载脚本:

//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js
/js/fancybox/jquery.fancybox-1.3.4.pack.js
/js/fancybox/jquery.mousewheel-3.0.4.pack.js

(删除 的第二个实例//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js

于 2013-05-13T02:46:46.420 回答