两段JS代码有冲突,高手能帮我修改一下,不胜感激!
$(".picimglink").css("text-decoration","none");$(".picimglink").bind({mouseenter:func...
$(".picimglink").css("text-decoration", "none");
$(".picimglink").bind({
mouseenter: function() {
$(this).children("span").animate({
bottom: "0px"
},
500)
},
mouseleave: function() {
$(this).children("span").clearQueue().animate({
bottom: "-30px"
},
500)
}
});
var biZhiDelayLoadImg = $("#bigUl img");
var biZhiDelayLoadImgLength = biZhiDelayLoadImg.length;
for (var i = 3; i < biZhiDelayLoadImgLength; i++) {
var curDelayImg = biZhiDelayLoadImg.eq(i);
if (curDelayImg.attr("srch")) {
curDelayImg.attr("src", curDelayImg.attr("srch"));
curDelayImg.removeAttr("srch")
}
}
var _focus_num = $("#smallUl > li").length;
var _focus_direction = true;
var _focus_pos = 0;
var _focus_max_length = _focus_num * 720;
var _focus_li_length = 720;
var _focus_dsq = null;
var _focus_lock = true;
function autoExecAnimate() {
$("#mypic" + _focus_pos).addClass("info-cur").siblings("li.info-cur").removeClass("info-cur");
var moveLen = _focus_pos * _focus_li_length;
$("#bigUl").animate({
left: "-" + moveLen + "px"
},
600);
if (_focus_pos == (_focus_num - 1)) {
_focus_direction = false
}
if (_focus_pos == 0) {
_focus_direction = true
}
if (_focus_direction) {
_focus_pos++
} else {
_focus_pos--
}
}
_focus_dsq = setInterval("autoExecAnimate()", 6000);
$("#smallUl > li").hover(function() {
_focus_pos = parseInt($(this).attr("sid"));
if (_focus_lock) {
clearInterval(_focus_dsq);
_focus_lock = false
}
$("#mypic" + _focus_pos).addClass("info-cur").siblings("li.info-cur").removeClass("info-cur");
var moveLen = _focus_pos * _focus_li_length;
$("#bigUl").stop(true, true).animate({
left: "-" + moveLen + "px"
},
600)
},
function() {
if (_focus_lock == false) {
_focus_dsq = setInterval("autoExecAnimate()", 6000);
_focus_lock = true
}
});
$("#bigUl").hover(function() {
if (_focus_lock) {
clearInterval(_focus_dsq);
_focus_lock = false
}
},
function() {
if (_focus_lock == false) {
_focus_dsq = setInterval("autoExecAnimate()", 6000);
_focus_lock = true
}
});
$(".pic-list2 li").hover(function() {
$(this).addClass("hover").siblings().removeClass("hover")
},
function() {
$(this).removeClass("hover")
});tInterval("jummper()", 6500);
第二段
var i=0;jummper();function jummper(){$(".car ul li").eq(i).find("img").css("left","-100%");$(".car ul li").eq(i).find("p").css("width","0%");$(".car ul li").eq(i).find("img").animate({left:"0"},500,function(){$(".car ul li").eq(i).find("p").animate({width:"1260px"},5000,function(){$(".car ul li").eq(i).find("img").animate({left:"100%"},500,function(){i++;if(i>2)i=0;$(".car ul li").eq(i).fadeIn(500).siblings().fadeOut(500)})})})}setInterval("jummper()",6500);setInterval("jummper()", 6500); 展开
$(".picimglink").bind({
mouseenter: function() {
$(this).children("span").animate({
bottom: "0px"
},
500)
},
mouseleave: function() {
$(this).children("span").clearQueue().animate({
bottom: "-30px"
},
500)
}
});
var biZhiDelayLoadImg = $("#bigUl img");
var biZhiDelayLoadImgLength = biZhiDelayLoadImg.length;
for (var i = 3; i < biZhiDelayLoadImgLength; i++) {
var curDelayImg = biZhiDelayLoadImg.eq(i);
if (curDelayImg.attr("srch")) {
curDelayImg.attr("src", curDelayImg.attr("srch"));
curDelayImg.removeAttr("srch")
}
}
var _focus_num = $("#smallUl > li").length;
var _focus_direction = true;
var _focus_pos = 0;
var _focus_max_length = _focus_num * 720;
var _focus_li_length = 720;
var _focus_dsq = null;
var _focus_lock = true;
function autoExecAnimate() {
$("#mypic" + _focus_pos).addClass("info-cur").siblings("li.info-cur").removeClass("info-cur");
var moveLen = _focus_pos * _focus_li_length;
$("#bigUl").animate({
left: "-" + moveLen + "px"
},
600);
if (_focus_pos == (_focus_num - 1)) {
_focus_direction = false
}
if (_focus_pos == 0) {
_focus_direction = true
}
if (_focus_direction) {
_focus_pos++
} else {
_focus_pos--
}
}
_focus_dsq = setInterval("autoExecAnimate()", 6000);
$("#smallUl > li").hover(function() {
_focus_pos = parseInt($(this).attr("sid"));
if (_focus_lock) {
clearInterval(_focus_dsq);
_focus_lock = false
}
$("#mypic" + _focus_pos).addClass("info-cur").siblings("li.info-cur").removeClass("info-cur");
var moveLen = _focus_pos * _focus_li_length;
$("#bigUl").stop(true, true).animate({
left: "-" + moveLen + "px"
},
600)
},
function() {
if (_focus_lock == false) {
_focus_dsq = setInterval("autoExecAnimate()", 6000);
_focus_lock = true
}
});
$("#bigUl").hover(function() {
if (_focus_lock) {
clearInterval(_focus_dsq);
_focus_lock = false
}
},
function() {
if (_focus_lock == false) {
_focus_dsq = setInterval("autoExecAnimate()", 6000);
_focus_lock = true
}
});
$(".pic-list2 li").hover(function() {
$(this).addClass("hover").siblings().removeClass("hover")
},
function() {
$(this).removeClass("hover")
});tInterval("jummper()", 6500);
第二段
var i=0;jummper();function jummper(){$(".car ul li").eq(i).find("img").css("left","-100%");$(".car ul li").eq(i).find("p").css("width","0%");$(".car ul li").eq(i).find("img").animate({left:"0"},500,function(){$(".car ul li").eq(i).find("p").animate({width:"1260px"},5000,function(){$(".car ul li").eq(i).find("img").animate({left:"100%"},500,function(){i++;if(i>2)i=0;$(".car ul li").eq(i).fadeIn(500).siblings().fadeOut(500)})})})}setInterval("jummper()",6500);setInterval("jummper()", 6500); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询