Quick help here guys. I am creating an interval in one function and want to clear it from another one. What I am doing is not working. Can anyone give me a clue.
IntervalName is locally scoped in each function. Short answer: put IntervalName = null at the top of your file. Long answer, when you define a variable (like InteralName) inside of a function, it is only available inside that function. If you want it to be available everywhere you need to define it globally. Look up how scoping works with local variables in coffeescript.
also im not sure why you're setting an interval to clear the interval.
Mike thanks so much. I am now clear about the scope of the variables within the functions. About that last comment you are totally right. Thanks for pointing out the mistake.