$.Callbacks
provides a way to manage lists of callbacks and it’s actually quite powerful. If we were to define two functions fn1
and fn2
we can then add
these functions as callbacks to a $.Callbacks
list and invoke them via the fire
method. The result of this is that it becomes simple to construct complex lists of callbacks where input values can be passed through to as many functions as needed with ease.
Demystifying jQuery 1.7′s $.Callbacks →
Published by Bramus!
Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)
View more posts