Team:Tokyo Tech/script

From 2014.igem.org

(Difference between revisions)
(Created page with "$( document ).ready(function() { function slideshow(delayInSeconds) { var images = document.getElementsByClassName('image'), currentStep = 0; setInterval(n...")
(Blanked the page)
 
Line 1: Line 1:
-
$( 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);
+
-
});
+

Latest revision as of 11:34, 17 October 2014