Weird arithmetical behavior in JavaScript
listed in answer
ANSWER:
Use the following code:
var self = this; // preserve this to be used inside the callback
setInterval(function() self.update(); , 3000)
Usually what you did would work, but some (Gecko-based) browsers pass an argument to the timer callback function.
by ThiefMaster from http://stackoverflow.com/questions/10791035

New Comments