I have a simple javascript class.
One method of this class sets up a timer using setInterval function. The method that I want to call every time the event fires is
setInterval can take a function directly, not just a string. https://developer.mozilla.org/en/DOM/window.setInterval
i.e.
loadingTimer = setInterval(showLoading, 100);
But, for optimal browser compatibility, you should use a closure with an explicit reference:
var t = this;
loadingTimer = setInterval(function(){t.showLoading();}, 100);