基本信息
源码名称:js图片轮循例子源码下载
源码大小:0.06M
文件格式:.zip
开发语言:js
更新时间:2015-03-20
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
$(function(){
$(".Div1_main div span").mouseover(function(){
$(this).addClass("Div1_main_span1").siblings("span").removeClass("Div1_main_span1");
}).mouseout(function(){
$(this).removeClass("Div1_main_span1").siblings("span");
})
var
index = 0 ;
Swidth = 1000 ;
timer = null ;
len = $(".Div1_title span a").length ;
function NextPage()
{
if(index>2)
{
index = 0 ;
}
$(".Div1_title span a").removeClass("Div1_title_a1").eq(index).addClass("Div1_title_a1");
$(".Div1_main").stop(true, false).animate({left: -index*Swidth "px"},600)
}
function PrevPage()
{
if(index<0)
{
index = 2 ;
}
$(".Div1_title span a").removeClass("Div1_title_a1").eq(index).addClass("Div1_title_a1");
$(".Div1_main").stop(true, false).animate({left: -index*Swidth "px"},600)
}
$(".Div1_title span a").each(function(a){
$(this).mouseover(function(){
index = a ;
NextPage();
});
});
//下一页
$(".Div1_next img").click(function(){
index ;
NextPage();
});
//上一页
$(".Div1_prev img").click(function(){
index-- ;
PrevPage();
});
//自动滚动
var timer = setInterval(function(){
index ;
NextPage();
},4000);
$(".Div1_next img , .Div1_main , .Div1_prev img , .Div1_title span").mouseover(function(){
clearInterval(timer);
});
$(".Div1_next img , .Div1_main , .Div1_prev img , .Div1_title span").mouseleave(function(){
timer = setInterval(function(){
index ;
NextPage();
},4000);
});
})//建站套餐