Here is the source, I honestly have no idea why it won’t load 🙁
http://jsfiddle.net/LThhd/8/ Here is the source, I honestly have no idea why it won’t load
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This line is causing an error because
restart()is not defined in the global scope:In your jsFiddle, all your javascript is inside the
onload()handler function so none of your functions are global. You need to either make the restart function be a truly global function sosetInterval()can find it at the top level or you need to change to a function reference and definerestart()in some scope that the setInterval line can see:FYI, this is one of the reasons why it’s a bad idea to pass strings to
setInterval(). Function references are much easier to control because they can be anywhere in scope – don’t have to only be global functions.