I am relatively new to jQuery, and am having a problem with binding "this" for a timer function. In Prototype I would just use the function "bind" and pass the object I wanted "this" to be bound to.
It seems in jQuery that method is to use "proxy," but I cannot get it to work.
I have a jQuery class (defined by sending extend to an existing class), called Gateway. In it I have a function "subscribe" and in that function I want to kick off a timer. My code looks like this (within the subscribe function):
Where "this" is the instance of the Gateway class. Essentially what I am trying to accomplish is, every 2 seconds, I want to call the updatePage method on the Gateway instance. When I run this code updatePage fires one time.
It feels like some sort of scoping issue, but I am not understanding it at all...