jQuery-自己的代码与旋转滑块冲突
我已经为悬停效果编写了自己的jquery小代码,它工作得非常好。但是,当我在页面上添加旋转滑块时,悬停效果就不能正常工作了。 当您将鼠标悬停在socialmedia按钮上时,您会在三角形滑入之前看到一个黑色背景,而这个黑色背景以前没有出现过 这是我的代码:jQuery-自己的代码与旋转滑块冲突,jquery,debugging,revolution-slider,conflicting-libraries,Jquery,Debugging,Revolution Slider,Conflicting Libraries,我已经为悬停效果编写了自己的jquery小代码,它工作得非常好。但是,当我在页面上添加旋转滑块时,悬停效果就不能正常工作了。 当您将鼠标悬停在socialmedia按钮上时,您会在三角形滑入之前看到一个黑色背景,而这个黑色背景以前没有出现过 这是我的代码: <div class="effect"> <svg class="facebook-svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmln
<div class="effect">
<svg class="facebook-svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="50px" height="50px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
<path fill="#000000" d="M17.252,11.106V8.65c0-0.922,0.611-1.138,1.041-1.138h2.643V3.459l-3.639-0.015c-4.041,0-4.961,3.023-.961,4.961v2.701H10v4.178h2.336v11.823h4.916V15.284h3.316l0.428-4.178H17.252z"/>
</svg>
<div class="mask first"></div>
<div class="mask second"></div>
</div>
我试着用no.conflict()
修复它,但到目前为止运气不佳。
当我将旋转滑块置于调试模式时,它工作正常,我觉得很奇怪
这是你的电话号码
socialmedia按钮位于页脚中
提前感谢所有花时间看这篇文章的人。我已经打开了网站,看不到你的描述。请遵循以下指导原则:编辑您的问题谢谢您的回复,在我发布此消息的第二天,我再次检查了我的网站,错误神奇地消失了!?我没有对代码做任何修改。但至少它是固定的!:)很高兴知道。也许下次使用Ctrl+F5刷新浏览器缓存时会对您有所帮助。现在轮到你删除这个问题了。
$( ".effect" ).hover(
function() {
$(".first", this).finish();
$(".second", this).finish();
if ( $( "img", this).length ) {
$width = $('img', this).width() + 'px';
$height = $('img', this).height() + 'px';
}
if ( $( "svg", this).length ) {
$width = $('svg', this).width() + 'px';
$height = $('svg', this).height() + 'px';
}
$( ".first", this ).css({"left" : $width, "top" : $height});
$( ".second", this ).css({"left" : "-" + $width, "top" : "-" + $height});
$( ".first", this ).css({"opacity" : "1"});
$( ".second", this ).css({"opacity" : "1"});
$( ".first", this ).filter(':not(:animated)').animate({
top: "-0",
left: "-0"
}, 200, function() {
// Animation complete.
});
$( ".second", this ).filter(':not(:animated)').animate({
top: "+0",
left: "+0"
}, 200, function() {
// Animation complete.
});
},
function() {
$( ".first", this ).animate({
top: "+" + $height,
left: "+" + $width
}, 200, function() {
$( ".first", this ).css({"opacity" : "0"});
});
$( ".second", this ).animate({
top: "-" + $height,
left: "-" + $width
}, 200, function() {
$( ".second", this ).css({"opacity" : "0"});
});
$width = undefined;
$height = undefined;
});