使用FancyBox和jQuery时出现奇怪的错误 [英] Strange Error when using FancyBox and jQuery
本文介绍了使用FancyBox和jQuery时出现奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试使用Fancybox时出现错误
I'm getting an error when trying to use Fancybox
Firebug告诉我
Firebug tells me
未定义jQuery
f.length; a;)this.addEventListener(f [--... s.unbind("mousewheel",a)}})})))(jQuery);
jQuery is not defined
f.length;a;)this.addEventListener(f[--...s.unbind("mousewheel",a)}})})(jQuery);
我肯定脚本和样式文件的所有路径都是正确的.
I'm positive that all the paths to script and style files are correct.
<script type="text/javascript" src="/Javascript/jquery.mousewheel-3.0.4.pack.js"> </script>
<script type="text/javascript" src="/Javascript/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="/Javascript/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#Enlarge").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack'
});});
</script>
推荐答案
jQuery行应在插件行之前.这就是为什么它说它是未定义的,因为它在其源代码中使用了jQuery库.
The jQuery line should be before the plugin line. That's why it says it's undefined, as it uses the jQuery library in its source.
<script type="text/javascript" src="/Javascript/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="/Javascript/jquery.mousewheel-3.0.4.pack.js"> </script>
<script type="text/javascript" src="/Javascript/jquery.fancybox-1.3.4.pack.js">
这篇关于使用FancyBox和jQuery时出现奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文