我很新,所以请详细解释。 我正在使用Lightbox 2 jQuery文件,以及另一个jQuery文件在我的图像上执行菜单幻灯片动画和淡入淡出动画。 我假设两个jQuery文件之间存在冲突,但我不确定如何解决它。Javascript灯箱2问题
有什么建议吗?我读了一些关于jQuery.noConflict()的内容,但我不知道如何实现它,或者它是否可以工作。
<script src="../Scripts/jquery-2.0.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('div#ScrollBox img').animate({
opacity:.5
});
$('div#ScrollBox img').hover(function(){
$(this).stop().animate({opacity:1}, 'fast');
}, function(){
$(this).stop().animate({opacity:.5}, 'slow');
});
});
</script>
<!--LIGHTBOX-->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/lightbox-2.6.min.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />
你能描述一下你得到的结果,并给出你使用的另一个插件的名字吗? – Dan
嗨丹。 添加了代码。我的灯箱在一个新窗口中打开了图像,而不是一个背景变暗的弹出窗口。 –