0

下面给出的脚本顺序有什么问题?我使用 fancybox 在我的网站上查看图像,但它不起作用。会不会是脚本顺序不对或者有冲突?我想用 fanybox 插件制作一个图片库。

这是我得到的错误:

Timestamp: 3/22/2013 2:25:05 PM Error: ReferenceError: jQuery is not defined Source File: file:///G:/LBC-FIRM/example.com/js/jquery.fancybox.js Line: 1985

这是我的脚本引用的顺序:

    <script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="js/jquery.fancybox.js"></script>
    <script type="text/javascript" src="js/tooltip.js"></script>
    <script type="text/javascript" src="js/image_groups.js"></script>
    <script type="text/javascript" src="js/thumbnail-slider.js"></script>
    <script type="text/javascript">
        $.noConflict();
    </script>

我的 HTML:

<script type="text/javascript">
    $(function(){
      $("#royal_place").click(function(){
    $.fancybox.open([
        {href : '../object/royal_palace/1.jpg'},
    {href : '../object/royal_palace/2.jpg'}, 
    {href : '../object/royal_palace/3.jpg'},
    {href : '../object/royal_palace/4.jpg'}, 
    {href : '../object/royal_palace/5.jpg'},
    {href : '../object/royal_palace/6.jpg'},
    {href : '../object/royal_palace/7.jpg'}, 
    {href : '../object/royal_palace/8.jpg'},
    {href : '../object/royal_palace/9.jpg'},
    {href : '../object/royal_palace/10.jpg'}
     ]);
      });           
   });
</script>

<a id="royal_place" href="javascript:;" >
    <img src="img/pic_tuk_tuk_1.png" alt="Tuk Tuk picture One" onmouseover="tooltip.pop(this, 'Tuk Tuk one')"/>
</a>
4

1 回答 1

0

尝试这个

 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
于 2013-03-22T07:50:40.757 回答