Team:Tokyo Tech/script
From 2014.igem.org
(Difference between revisions)
Cerburus (Talk | contribs)
(Created page with "$( document ).ready(function() { function slideshow(delayInSeconds) { var images = document.getElementsByClassName('image'), currentStep = 0; setInterval(n...")
Newer edit →
(Created page with "$( document ).ready(function() { function slideshow(delayInSeconds) { var images = document.getElementsByClassName('image'), currentStep = 0; setInterval(n...")
Newer edit →
Revision as of 11:33, 17 October 2014
$( document ).ready(function() {
function slideshow(delayInSeconds) { var images = document.getElementsByClassName('image'), currentStep = 0; setInterval(nextImage, delayInSeconds * 1000); function nextImage() { TweenLite.to(images[currentStep % images.length], delayInSeconds/2, {opacity:0}); TweenLite.to(images[++currentStep % images.length], delayInSeconds/2, {opacity:1}); } } slideshow(7);
});