Template:Team:KIT-Kyoto/hp

From 2014.igem.org

(Difference between revisions)
(Undo revision 147309 by Pudding (talk))
Line 35: Line 35:
clearInterval(loop1);
clearInterval(loop1);
clearInterval(loop2);
clearInterval(loop2);
 +
clearInterval(loop3);
$("#stop").removeClass('stop');
$("#stop").removeClass('stop');
$("#stop a").css("background-image","url(/wiki/images/0/0c/Kit_Play.png)");
$("#stop a").css("background-image","url(/wiki/images/0/0c/Kit_Play.png)");
Line 40: Line 41:
loop1 = setInterval(slide1,5000);
loop1 = setInterval(slide1,5000);
loop2 = setInterval(slide2,5000);
loop2 = setInterval(slide2,5000);
 +
loop1 = setInterval(slide3,5000);
$("#stop").addClass('stop');
$("#stop").addClass('stop');
$("#stop a").css("background-image","url(/wiki/images/9/90/Kit_Pause.png)");
$("#stop a").css("background-image","url(/wiki/images/9/90/Kit_Pause.png)");
Line 45: Line 47:
});
});
$("#stop a").hover(function(){
$("#stop a").hover(function(){
-
$("#stop a").stop().animate({opacity:"0.7"},500);
+
$("#stop a").stop().animate({opacity:"0.7"},400);
},
},
function(){
function(){
-
$("#stop a").stop().animate({opacity:"1"},500);
+
$("#stop a").stop().animate({opacity:"1"},400);
}
}
);
);
Line 57: Line 59:
var loop1 = setInterval(slide1,5000);
var loop1 = setInterval(slide1,5000);
     function slide1() {
     function slide1() {
-
     var clone = $(".pic1 li:first,.pic3 li:first").clone(true);
+
     var clone = $(".pic1 li:first").clone(true);
     if(picbox >= picw){
     if(picbox >= picw){
-
     $(".pic1 li:nth-child(4),.pic3 li:nth-child(4)").css({opacity:"0"});
+
     $(".pic1 li:nth-child(4)").css({opacity:"0"});
     }else if(picbox >= mpicw){
     }else if(picbox >= mpicw){
-
     $(".pic1 li:nth-child(3),.pic3 li:nth-child(3)").css({opacity:"0"});
+
     $(".pic1 li:nth-child(3)").css({opacity:"0"});
     }else {
     }else {
-
     $(".pic1 li:nth-child(2),.pic3 li:nth-child(2)").css({opacity:"0"});
+
     $(".pic1 li:nth-child(2)").css({opacity:"0"});
     }
     }
-
     $(".pic1 li:first,.pic3 li:first").animate({
+
     $(".pic1 li:first").animate({
     marginRight : "-270px",opacity:"0"
     marginRight : "-270px",opacity:"0"
     }, {
     }, {
Line 71: Line 73:
     complete : function() {   
     complete : function() {   
     if(picbox >= picw){
     if(picbox >= picw){
-
     $(".pic1 li:nth-child(4),.pic3 li:nth-child(4)").animate({opacity:"1"},1200);
+
     $(".pic1 li:nth-child(4)").animate({opacity:"1"},1200);
     }
     }
     else if(picbox >= mpicw){
     else if(picbox >= mpicw){
-
     $(".pic1 li:nth-child(3),.pic3 li:nth-child(3)").animate({opacity:"1"},1200);
+
     $(".pic1 li:nth-child(3)").animate({opacity:"1"},1200);
     }else {
     }else {
-
     $(".pic1 li:nth-child(2),.pic3 li:nth-child(2)").animate({opacity:"1"},1200);
+
     $(".pic1 li:nth-child(2)").animate({opacity:"1"},1200);
     }
     }
-
         $(".pic1 li:first,.pic3 li:first").remove();
+
         $(".pic1 li:first").remove();
-
         clone.clone(true).insertAfter($(".pic1 li:last,.pic3 li:last"));
+
         clone.clone(true).insertAfter($(".pic1 li:last"));
     }
     }
     });
     });
Line 109: Line 111:
         $(".pic2 li:first").remove();
         $(".pic2 li:first").remove();
         clone.clone(true).insertAfter($(".pic2 li:last"));
         clone.clone(true).insertAfter($(".pic2 li:last"));
 +
    }
 +
    });
 +
    }
 +
 +
var loop3 = setInterval(slide1,5000);
 +
    function slide1() {
 +
    var clone = $(".pic3 li:first").clone(true);
 +
    if(picbox >= picw){
 +
    $(".pic3 li:nth-child(4)").css({opacity:"0"});
 +
    }else if(picbox >= mpicw){
 +
    $(".pic3 li:nth-child(3)").css({opacity:"0"});
 +
    }else {
 +
    $(".pic3 li:nth-child(2)").css({opacity:"0"});
 +
    }
 +
    $(".pic3 li:first").animate({
 +
    marginRight : "-270px",opacity:"0"
 +
    }, {
 +
    duration : 800,
 +
    complete : function() { 
 +
    if(picbox >= picw){
 +
    $(".pic3 li:nth-child(4)").animate({opacity:"1"},1200);
 +
    }
 +
    else if(picbox >= mpicw){
 +
    $(".pic3 li:nth-child(3)").animate({opacity:"1"},1200);
 +
    }else {
 +
    $(".pic3 li:nth-child(2)").animate({opacity:"1"},1200);
 +
    }
 +
        $(".pic3 li:first").remove();
 +
        clone.clone(true).insertAfter($(".pic3 li:last"));
     }
     }
     });
     });

Revision as of 17:36, 30 September 2014