Created
June 21, 2015 04:00
-
-
Save frecel/58e09b989437dc724c46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var aniend = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; | |
function layerClassChanger(slide){ | |
var i = 0; | |
slide.children.forEach(function (e) { | |
i++; | |
e.className = "layer" + i.toString() + " slide-item animated phase" + i.toString(); | |
}); | |
} | |
//Rotten can't loop | |
function rottCantLoop(newSlide, oldSlide) { | |
var ns = document.getElementById("slide" + newSlide); | |
ns.className = "enabled"; | |
layerClassChanger(ns); | |
var os = document.getElementBy("slide" + oldSlide); | |
os.className = "disabled"; | |
layerClassChanger(os); | |
} | |
for (var i = 0; i < 4; i++) { | |
var oldSlide = i+1; | |
var newSlide = i+2; | |
rottCantLoop(newSlide, oldSlide); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment