轮播制作
$(function(){
var h=$(".silde img").width();
var index=0;
var timer;
var len=$(".silde li").length;
$(".silde-page>li").click(function(){
$(this).css({"background":"#D03800","opacity":"0.7"}).siblings().css({"background":"black","opacity":"0.5"});
index=$(this).index();
console.log(index);
move();
// (".silde").animate({marginLeft:-h*index+"px"},1000);
});
function move(){
if(index==len){
index=0;
}
$(".silde").animate({marginLeft:-h*index+"px"},1000,function(){
index++
});
console.log(index);
$(".silde-page>li").eq(index).css({"background":"#D03800","opacity":"0.7"}).siblings().css({"background":"black","opacity":"0.5"})
}
timer=setInterval(move,2500);
$(".silde img").hover(function(){
clearInterval(timer)
},function(){
timer=setInterval(move,2500);
})