/*自定义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(){
//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 ul").position().left; $(".Content .Students ul").stop().animate({"left":"0px"},500,function(){ $(".Content .Students ul").prepend($(".Content .Students ul li:last")); $(".Content .Students ul").css({"left":scrollLenth}); });
}
function Students_ScrollRight(){
var scrollLenth=$(".Content ul").position().left; $(".Content .Students ul").stop().animate({"left":scrollLenth*2},500,function(){ $(".Content .Students ul").append($(".Content .Students ul li:first")); $(".Content .Students ul").css({"left":scrollLenth}); });
console.log(scrollLenth); }
//Teachers function Teachers_ScrollLeft(){
var scrollLenth=$(".Content ul").position().left; $(".Content .Teachers ul").stop().animate({"left":"0px"},500,function(){ $(".Content .Teachers ul").prepend($(".Content .Teachers ul li:last")); $(".Content .Teachers ul").css({"left":scrollLenth}); });
}
function Teachers_ScrollRight(){
var scrollLenth=$(".Content ul").position().left; $(".Content .Teachers ul").stop().animate({"left":scrollLenth*2},500,function(){ $(".Content .Teachers ul").append($(".Content .Teachers ul li:first")); $(".Content .Teachers ul").css({"left":scrollLenth}); });
}