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 img1_4 = $(".pic1 li:nth-child(4)"); | |
+ | var img1_3 = $(".pic1 li:nth-child(3)"); | ||
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){ | ||
- | + | img1_4.css({opacity:"0"}); | |
}else { | }else { | ||
- | + | img1_3.css({opacity:"0"}); | |
} | } | ||
$(".pic1 li:first").animate({ | $(".pic1 li:first").animate({ | ||
Line 49: | Line 50: | ||
complete : function() { | complete : function() { | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | + | img1_4.animate({opacity:"1"},1200); | |
} | } | ||
else { | else { | ||
- | + | img1_3.animate({opacity:"1"},1200); | |
} | } | ||
$(".pic1 li:first").remove(); | $(".pic1 li:first").remove(); | ||
Line 60: | Line 61: | ||
}, 6000); | }, 6000); | ||
- | + | var img2_4 = $(".pic2 li:nth-child(4)"); | |
+ | var img2_3 = $(".pic2 li:nth-child(3)"); | ||
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){ | ||
- | + | img2_4.css({opacity:"0"}); | |
}else { | }else { | ||
- | + | img2_3.css({opacity:"0"}); | |
} | } | ||
$(".pic2 li:first").animate({ | $(".pic2 li:first").animate({ | ||
Line 74: | Line 76: | ||
complete : function() { | complete : function() { | ||
if(picbox >= picw){ | if(picbox >= picw){ | ||
- | + | img2_4.animate({opacity:"1"},1200); | |
} | } | ||
else { | else { | ||
- | + | img2_3.animate({opacity:"1"},1200); | |
} | } | ||
$(".pic2 li:first").remove(); | $(".pic2 li:first").remove(); |
Revision as of 19:19, 26 September 2014