YuhangYang (Talk | contribs) |
|||
Line 1: | Line 1: | ||
− | /* | + | /*custom Team Effect*/ |
$(function(){ | $(function(){ | ||
Line 11: | Line 11: | ||
− | /* | + | /*Carousel*/ |
$(function(){ | $(function(){ | ||
− | // | + | //Team_Member |
− | $(".Content . | + | $(".Content .Team_Member .scroll").hover(function(){ |
− | clearInterval( | + | clearInterval(Team_Member_Time); |
},function(){ | },function(){ | ||
− | + | Team_Member_Time=setInterval("Team_Member_ScrollRight()",3000); | |
}); | }); | ||
− | $(".Content . | + | $(".Content .Team_Member .icon_left").click(function(){ |
− | + | Team_Member_ScrollLeft(); | |
}); | }); | ||
− | $(".Content . | + | $(".Content .Team_Member .icon_right").click(function(){ |
− | + | Team_Member_ScrollRight(); | |
}); | }); | ||
− | // | + | //Instructor |
− | $(".Content . | + | $(".Content .Instructor .scroll").hover(function(){ |
− | clearInterval( | + | clearInterval(Instructor_Time); |
},function(){ | },function(){ | ||
− | + | Instructor_Time=setInterval("Instructor_ScrollRight()",3000); | |
}); | }); | ||
− | $(".Content . | + | $(".Content .Instructor .icon_left").click(function(){ |
− | + | Instructor_ScrollLeft(); | |
}); | }); | ||
− | $(".Content . | + | $(".Content .Instructor .icon_right").click(function(){ |
− | + | Instructor_ScrollRight(); | |
}); | }); | ||
Line 55: | Line 55: | ||
}); | }); | ||
− | var | + | var Team_Member_Time=setInterval("Team_Member_ScrollRight()",3000); |
− | var | + | var Instructor_Time=setInterval("Instructor_ScrollRight()",3000); |
− | // | + | //Team_Member |
− | function | + | function Team_Member_ScrollLeft(){ |
var scrollLenth=$(".Content ul").position().left; | var scrollLenth=$(".Content ul").position().left; | ||
− | $(".Content . | + | $(".Content .Team_Member ul").stop().animate({"left":"0px"},500,function(){ |
− | $(".Content . | + | $(".Content .Team_Member ul").prepend($(".Content .Team_Member ul li:last")); |
− | $(".Content . | + | $(".Content .Team_Member ul").css({"left":scrollLenth}); |
}); | }); | ||
} | } | ||
− | function | + | function Team_Member_ScrollRight(){ |
var scrollLenth=$(".Content ul").position().left; | var scrollLenth=$(".Content ul").position().left; | ||
if(scrollLenth=="-507"){ | if(scrollLenth=="-507"){ | ||
− | $(".Content . | + | $(".Content .Team_Member ul").stop().animate({"left":"-1014px"},500,function(){ |
− | $(".Content . | + | $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); |
− | $(".Content . | + | $(".Content .Team_Member ul").css({"left":scrollLenth}); |
+ | }); | ||
+ | } | ||
+ | else if(scrollLenth=="-539"){ | ||
+ | $(".Content .Team_Member ul").stop().animate({"left":"-1078px"},500,function(){ | ||
+ | $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); | ||
+ | $(".Content .Team_Member ul").css({"left":scrollLenth}); | ||
}); | }); | ||
} | } | ||
else if(scrollLenth=="-450"){ | else if(scrollLenth=="-450"){ | ||
− | $(".Content . | + | $(".Content .Team_Member ul").stop().animate({"left":"-900px"},500,function(){ |
− | $(".Content . | + | $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); |
− | $(".Content . | + | $(".Content .Team_Member ul").css({"left":scrollLenth}); |
}); | }); | ||
} | } | ||
else{ | else{ | ||
− | $(".Content . | + | $(".Content .Team_Member ul").stop().animate({"left":"-1660px"},500,function(){ |
− | $(".Content . | + | $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); |
− | $(".Content . | + | $(".Content .Team_Member ul").css({"left":scrollLenth}); |
}); | }); | ||
} | } | ||
Line 94: | Line 100: | ||
} | } | ||
− | // | + | //Instructor |
− | function | + | function Instructor_ScrollLeft(){ |
var scrollLenth=$(".Content ul").position().left; | var scrollLenth=$(".Content ul").position().left; | ||
− | $(".Content . | + | $(".Content .Instructor ul").stop().animate({"left":"0px"},500,function(){ |
− | $(".Content . | + | $(".Content .Instructor ul").prepend($(".Content .Instructor ul li:last")); |
− | $(".Content . | + | $(".Content .Instructor ul").css({"left":scrollLenth}); |
}); | }); | ||
} | } | ||
− | function | + | function Instructor_ScrollRight(){ |
var scrollLenth=$(".Content ul").position().left; | var scrollLenth=$(".Content ul").position().left; | ||
if(scrollLenth=="-507"){ | if(scrollLenth=="-507"){ | ||
− | $(".Content . | + | $(".Content .Instructor ul").stop().animate({"left":"-1014px"},500,function(){ |
− | $(".Content . | + | $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); |
− | $(".Content . | + | $(".Content .Instructor ul").css({"left":scrollLenth}); |
+ | }); | ||
+ | } | ||
+ | else if(scrollLenth=="-539"){ | ||
+ | $(".Content .Instructor ul").stop().animate({"left":"-1078px"},500,function(){ | ||
+ | $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); | ||
+ | $(".Content .Instructor ul").css({"left":scrollLenth}); | ||
}); | }); | ||
} | } | ||
else if(scrollLenth=="-450"){ | else if(scrollLenth=="-450"){ | ||
− | $(".Content . | + | $(".Content .Instructor ul").stop().animate({"left":"-900px"},500,function(){ |
− | $(".Content . | + | $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); |
− | $(".Content . | + | $(".Content .Instructor ul").css({"left":scrollLenth}); |
}); | }); | ||
} | } | ||
else{ | else{ | ||
− | $(".Content . | + | $(".Content .Instructor ul").stop().animate({"left":"-1660px"},500,function(){ |
− | $(".Content . | + | $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); |
− | $(".Content . | + | $(".Content .Instructor ul").css({"left":scrollLenth}); |
}); | }); | ||
} | } | ||
} | } |
Revision as of 17:44, 23 September 2017
/*custom Team Effect*/ $(function(){
$(".header .nav .mainnav").eq(1).hover(function(){ $(".header .nav .Team span").css("color","#FAEE0D"); },function(){ $(".header .nav .Team span").css("color","#FAEE0D"); });
});
/*Carousel*/
$(function(){
//Team_Member $(".Content .Team_Member .scroll").hover(function(){
clearInterval(Team_Member_Time);
},function(){
Team_Member_Time=setInterval("Team_Member_ScrollRight()",3000);
});
$(".Content .Team_Member .icon_left").click(function(){ Team_Member_ScrollLeft(); });
$(".Content .Team_Member .icon_right").click(function(){ Team_Member_ScrollRight(); });
//Instructor $(".Content .Instructor .scroll").hover(function(){
clearInterval(Instructor_Time);
},function(){
Instructor_Time=setInterval("Instructor_ScrollRight()",3000);
});
$(".Content .Instructor .icon_left").click(function(){ Instructor_ScrollLeft(); });
$(".Content .Instructor .icon_right").click(function(){ Instructor_ScrollRight(); });
});
var Team_Member_Time=setInterval("Team_Member_ScrollRight()",3000); var Instructor_Time=setInterval("Instructor_ScrollRight()",3000);
//Team_Member function Team_Member_ScrollLeft(){
var scrollLenth=$(".Content ul").position().left; $(".Content .Team_Member ul").stop().animate({"left":"0px"},500,function(){ $(".Content .Team_Member ul").prepend($(".Content .Team_Member ul li:last")); $(".Content .Team_Member ul").css({"left":scrollLenth}); });
}
function Team_Member_ScrollRight(){
var scrollLenth=$(".Content ul").position().left;
if(scrollLenth=="-507"){ $(".Content .Team_Member ul").stop().animate({"left":"-1014px"},500,function(){ $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); $(".Content .Team_Member ul").css({"left":scrollLenth}); }); } else if(scrollLenth=="-539"){ $(".Content .Team_Member ul").stop().animate({"left":"-1078px"},500,function(){ $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); $(".Content .Team_Member ul").css({"left":scrollLenth}); }); } else if(scrollLenth=="-450"){ $(".Content .Team_Member ul").stop().animate({"left":"-900px"},500,function(){ $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); $(".Content .Team_Member ul").css({"left":scrollLenth}); }); } else{ $(".Content .Team_Member ul").stop().animate({"left":"-1660px"},500,function(){ $(".Content .Team_Member ul").append($(".Content .Team_Member ul li:first")); $(".Content .Team_Member ul").css({"left":scrollLenth}); }); }
}
//Instructor function Instructor_ScrollLeft(){
var scrollLenth=$(".Content ul").position().left; $(".Content .Instructor ul").stop().animate({"left":"0px"},500,function(){ $(".Content .Instructor ul").prepend($(".Content .Instructor ul li:last")); $(".Content .Instructor ul").css({"left":scrollLenth}); });
}
function Instructor_ScrollRight(){
var scrollLenth=$(".Content ul").position().left;
if(scrollLenth=="-507"){ $(".Content .Instructor ul").stop().animate({"left":"-1014px"},500,function(){ $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); $(".Content .Instructor ul").css({"left":scrollLenth}); }); } else if(scrollLenth=="-539"){ $(".Content .Instructor ul").stop().animate({"left":"-1078px"},500,function(){ $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); $(".Content .Instructor ul").css({"left":scrollLenth}); }); } else if(scrollLenth=="-450"){ $(".Content .Instructor ul").stop().animate({"left":"-900px"},500,function(){ $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); $(".Content .Instructor ul").css({"left":scrollLenth}); }); } else{ $(".Content .Instructor ul").stop().animate({"left":"-1660px"},500,function(){ $(".Content .Instructor ul").append($(".Content .Instructor ul li:first")); $(".Content .Instructor ul").css({"left":scrollLenth}); }); }
}