下面给出的脚本命令有什么问题?我使用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>
答案 0 :(得分:0)
试试这个
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>