Created
July 20, 2010 17:16
-
-
Save emjayess/483240 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//artificially delay a javascript redirect w/anonymous function | |
//n represents delay in seconds | |
(function(){ | |
var i,c=0,n=3; | |
i=window.setInterval(function(){ | |
if(c++==n){ | |
window.clearInterval(i); | |
top.location='http://redirect-here.tld/'; | |
} | |
},1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see also: @cowboy ben alman's
doTimeout