Skip to content

Instantly share code, notes, and snippets.

@mattpat
Created March 10, 2011 22:57
Show Gist options
  • Save mattpat/865126 to your computer and use it in GitHub Desktop.
Save mattpat/865126 to your computer and use it in GitHub Desktop.
slides = [
function(){
spinner(spinnerContainer);
},
function(){
setOpacity("bootScreen", 1);
},
function(){
setOpacity("blah", 0);
setOpacity("blahblah", 0.5);
doSomethingElse("yaddayadda", 42);
}
];
// the code that makes it work
var currentSlide = 0;
function nextSlide()
{
if (slides.length > (currentSlide + 1))
slides[++currentSlide]();
else
{
currentSlide = 0;
slides[0]();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment