I\'m basically trying to accomplish the following. I want it so 5 seconds after the page loads, it\'ll set the variable to true.
Once true, it\'ll proceed to give t
You've got the right idea, but you have a minor issue with variable scope. To reduce headaches, it's really best to get away from using the string eval option on setTimeout (which is shown in tutorials all around the web, I know) and use an anonymous function:
var link;
function loading(){
setTimeout(function(){
link = true;
}, 5000);
}
This way, you'll know exactly where link is declared and the scope is crystal clear.