Skip to content

Instantly share code, notes, and snippets.

@darkwing
Forked from chriscoyier/gist:896686
Created March 31, 2011 16:30
Show Gist options
  • Save darkwing/896704 to your computer and use it in GitHub Desktop.
Save darkwing/896704 to your computer and use it in GitHub Desktop.
var cycles = 0;
var loaded = true;
var minTime = 15000;
var int = 50
var loaded = false;
$(window).load(function() {
loaded = true;
});
var interval = setInterval(function() {
if((cycles * ++int) >= minTime && loaded) {
$("html").addCLass('loaded');
clearInterval(interval);
}
},int);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment