Team:SSTi-SZGD/js/Team

/*自定义Team效果*/ $(function(){

$(".header .nav .mainnav").eq(1).hover(function(){ $(".header .nav .Team span").css("color","#FAEE0D"); },function(){ $(".header .nav .Team span").css("color","#FAEE0D"); });

});


/*轮播*/ $(function(){

//public var scrollLenth=$(".Content ul").outerWidth(); $(".Content ul").css("left",-scrollLenth*0.11);

//Students $(".Content .Students .scroll").hover(function(){

clearInterval(Students_Time);

},function(){

Students_Time=setInterval("Students_ScrollRight()",3000);

});

$(".Content .Students .icon_left").click(function(){ Students_ScrollLeft(); });

$(".Content .Students .icon_right").click(function(){ Students_ScrollRight(); });

//Teachers $(".Content .Teachers .scroll").hover(function(){

clearInterval(Teachers_Time);

},function(){

Teachers_Time=setInterval("Teachers_ScrollRight()",3000);

});

$(".Content .Teachers .icon_left").click(function(){ Teachers_ScrollLeft(); });

$(".Content .Teachers .icon_right").click(function(){ Teachers_ScrollRight(); });

});

var Students_Time=setInterval("Students_ScrollRight()",3000); var Teachers_Time=setInterval("Teachers_ScrollRight()",3000);

//Students function Students_ScrollLeft(){

var scrollLenth=$(".Content .Students ul").outerWidth(); $(".Content .Students ul").stop().animate({"left":"0px"},500,function(){ $(".Content .Students ul").prepend($(".Content .Students ul li:last")); $(".Content .Students ul").css({"left":-scrollLenth*0.11}); });

}

function Students_ScrollRight(){

var scrollLenth=$(".Content .Students ul").outerWidth(); $(".Content .Students ul").stop().animate({"left":-scrollLenth*0.11*2},500,function(){ $(".Content .Students ul").append($(".Content .Students ul li:first")); $(".Content .Students ul").css({"left":-scrollLenth*0.11}); });

}

//Teachers function Teachers_ScrollLeft(){

var scrollLenth=$(".Content .Teachers ul").outerWidth(); $(".Content .Teachers ul").stop().animate({"left":"0px"},500,function(){ $(".Content .Teachers ul").prepend($(".Content .Teachers ul li:last")); $(".Content .Teachers ul").css({"left":-scrollLenth*0.11}); });

}

function Teachers_ScrollRight(){

var scrollLenth=$(".Content .Teachers ul").outerWidth(); $(".Content .Teachers ul").stop().animate({"left":-scrollLenth*0.11*2},500,function(){ $(".Content .Teachers ul").append($(".Content .Teachers ul li:first")); $(".Content .Teachers ul").css({"left":-scrollLenth*0.11}); });

}