Skip to content

Instantly share code, notes, and snippets.

@mattpat
Created March 10, 2011 22:52
Show Gist options
  • Save mattpat/865119 to your computer and use it in GitHub Desktop.
Save mattpat/865119 to your computer and use it in GitHub Desktop.
slide(function(){
spinner(spinnerContainer);
});
slide(function(){
setOpacity("bootScreen", 1);
});
slide(function(){
setOpacity("blah", 0);
setOpacity("blahblah", 0.5);
doSomethingElse("yaddayadda", 42);
});
// the code that makes it work
var currentSlide = 0;
var slides = [];
function slide(spec)
{
slides.push(spec);
}
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