Template:Team:KIT-Kyoto/hp
From 2014.igem.org
(Difference between revisions)
Line 57: | Line 57: | ||
var loop1 = setInterval(slide1,5000); | var loop1 = setInterval(slide1,5000); | ||
function slide1() { | function slide1() { | ||
- | var clone = $(".pic1 li:first").clone(true); | + | var clone = $(".pic1 li:first,.pic3 li:first").clone(true); |
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | $(".pic1 li:nth-child(4)").css({opacity:"0"}); | + | $(".pic1 li:nth-child(4),.pic3 li:nth-child(4)").css({opacity:"0"}); |
}else if(picbox >= mpicw){ | }else if(picbox >= mpicw){ | ||
- | $(".pic1 li:nth-child(3)").css({opacity:"0"}); | + | $(".pic1 li:nth-child(3),.pic3 li:nth-child(3)").css({opacity:"0"}); |
}else { | }else { | ||
- | $(".pic1 li:nth-child(2)").css({opacity:"0"}); | + | $(".pic1 li:nth-child(2),.pic3 li:nth-child(2)").css({opacity:"0"}); |
} | } | ||
- | $(".pic1 li:first").animate({ | + | $(".pic1 li:first,.pic3 li:first").animate({ |
marginRight : "-270px",opacity:"0" | marginRight : "-270px",opacity:"0" | ||
}, { | }, { | ||
Line 71: | Line 71: | ||
complete : function() { | complete : function() { | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | $(".pic1 li:nth-child(4)").animate({opacity:"1"},1200); | + | $(".pic1 li:nth-child(4),.pic3 li:nth-child(4)").animate({opacity:"1"},1200); |
} | } | ||
else if(picbox >= mpicw){ | else if(picbox >= mpicw){ | ||
- | $(".pic1 li:nth-child(3)").animate({opacity:"1"},1200); | + | $(".pic1 li:nth-child(3),.pic3 li:nth-child(3)").animate({opacity:"1"},1200); |
}else { | }else { | ||
- | $(".pic1 li:nth-child(2)").animate({opacity:"1"},1200); | + | $(".pic1 li:nth-child(2),.pic3 li:nth-child(2)").animate({opacity:"1"},1200); |
} | } | ||
- | $(".pic1 li:first").remove(); | + | $(".pic1 li:first,.pic3 li:first").remove(); |
- | clone.clone(true).insertAfter($(".pic1 li:last")); | + | clone.clone(true).insertAfter($(".pic1 li:last,.pic3 li:last")); |
} | } | ||
}); | }); | ||
Line 112: | Line 112: | ||
}); | }); | ||
} | } | ||
+ | |||
}); | }); |
Revision as of 17:31, 30 September 2014