jQuery Timers

jQuery timers is an attempt to combine jQuery’s concise chaining programming style with the awkward style in which timed events are coded in JavaScript to produce a friendlier and more intuitive timed event system. In addition, it fixes the most prevalent issue with the various event systems of JavaScript: misconfigured scope. All the methods you design to use in setTimeout/setInterval in JavaScript cannot use ‘this’ to reference the desired element because ‘this’ always references the window object. Because of this, closures are required to produce useful code. Without the need for closures, these methods could be stored inside the class rather than inside the calling method which would produce a more modular and object oriented style of coding.

Tags

Similar Posts