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 the alert "true".. for now. If someone tries to click the button before 5 seconds, it'll give the alert false.
See Question&Answers more detail:os