[英]No Conflict causing issues with other jquery
因此,我几天前发表了一篇文章,试图获得帮助,以了解如何实现无冲突。 感谢@tdanielcox为我提供的帮助。 我正确实现了它,但似乎导致灯箱出现问题,而该灯箱在实现无冲突之前可以正常工作。
这是不冲突的页面。
http://michaelcullenbenson.com/MichaelCullenBenson.com/index2.html
灯箱处于每个图像的悬停状态,请单击放大镜。
该页面在实现无冲突之前就已经存在,并且具有可正常使用的灯箱版本,但是底部的滴状供稿中断了,没有冲突。
http://michaelcullenbenson.com/MichaelCullenBenson.com/index.html
如果我删除了jQuery 1.6.1,灯箱将继续相应地再次运行。 与lightbox一起使用的唯一jquery文件是(jquery.magnific-popup.js),但不需要1.6.1 jquery库,因此我很困惑为什么会影响它。
这是与jquery没有冲突的标记。 非常感谢您的帮助! 不知道我有多欣赏。
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.innerfade.js"></script>
<script type="text/javascript">
$(document).ready(
function(){
$('#news').innerfade({
animationtype: 'slide',
speed: 600,
timeout: 6000,
type: 'random',
containerheight: '1em'
});
});
</script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="utilcarousel-files/utilcarousel/jquery.utilcarousel.min.js"></script>
<script src="utilcarousel-files/magnific-popup/jquery.magnific-popup.js"></script>
<script src="js/responsive-nav.js"></script>
<script>
$(function() {
$('#fullwidth').utilCarousel({
breakPoints : [[600, 1], [800, 2], [1000, 3], [1300, 4],],
mouseWheel : false,
rewind : true,
autoPlay : true,
pagination : false
});
$('#fullwidth2').utilCarousel({
breakPoints : [[600, 1], [800, 2], [1000, 3], [1300, 4],],
mouseWheel : false,
rewind : true,
autoPlay : true,
pagination : false
});
});
</script>
< script >
$(document).ready(function() {
var movementStrength = 25;
var height = movementStrength / $(window).height();
var width = movementStrength / $(window).width();
$("#aboutarea").mousemove(function(e){
var pageX = e.pageX - ($(window).width() / 2);
var pageY = e.pageY - ($(window).height() / 2);
var newvalueX = width * pageX * -1 - 25;
var newvalueY = height * pageY * -1 - 50;
$('#aboutarea').css("background-position", newvalueX+"px "+newvalueY+"px");
});
});
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script>var $j6 = jQuery.noConflict();</script>
<script type="text/javascript" src="dribbble.js"></script>
<script type="text/javascript">
$j6(function () {
$j6('#user').dribbble({
player: 'MCBDesign',
total: 1
});
});
</script>
您是否尝试过var $j6 = jQuery.noConflict(true);
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.