Template:Team:KIT-Kyoto/hp
From 2014.igem.org
(Difference between revisions)
Line 35: | Line 35: | ||
var picbox = $("#picbox").width(); | var picbox = $("#picbox").width(); | ||
var picw = 809; | var picw = 809; | ||
- | |||
- | |||
var loop = setInterval(function() { | var loop = setInterval(function() { | ||
var clone = $(".pic1 li:first").clone(true); | var clone = $(".pic1 li:first").clone(true); | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | + | $(".pic1 li:nth-child(4)").css({opacity:"0"}); | |
}else { | }else { | ||
- | + | $(".pic1 li:nth-child(3)").css({opacity:"0"}); | |
} | } | ||
$(".pic1 li:first").animate({ | $(".pic1 li:first").animate({ | ||
Line 50: | Line 48: | ||
complete : function() { | complete : function() { | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | + | $(".pic1 li:nth-child(4)").animate({opacity:"1"},1200); | |
} | } | ||
else { | else { | ||
- | + | $(".pic1 li:nth-child(3)").animate({opacity:"1"},1200); | |
} | } | ||
$(".pic1 li:first").remove(); | $(".pic1 li:first").remove(); | ||
Line 61: | Line 59: | ||
}, 6000); | }, 6000); | ||
- | + | ||
- | + | ||
var loop = setInterval(function() { | var loop = setInterval(function() { | ||
var clone = $(".pic2 li:first").clone(true); | var clone = $(".pic2 li:first").clone(true); | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | + | $(".pic2 li:nth-child(4)").css({opacity:"0"}); | |
}else { | }else { | ||
- | + | $(".pic2 li:nth-child(3)").css({opacity:"0"}); | |
} | } | ||
$(".pic2 li:first").animate({ | $(".pic2 li:first").animate({ | ||
Line 76: | Line 73: | ||
complete : function() { | complete : function() { | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | + | $(".pic2 li:nth-child(4)").animate({opacity:"1"},1200); | |
} | } | ||
else { | else { | ||
- | + | $(".pic2 li:nth-child(3)").animate({opacity:"1"},1200); | |
} | } | ||
$(".pic2 li:first").remove(); | $(".pic2 li:first").remove(); |
Revision as of 19:22, 26 September 2014