Of course, if you decide to install 1000 functions that listen to one event, I would say something is wrong with your design, but for me, two functions are just ok.
I would go with name handlers to maintain maintainability, at least if St. John developed it in jQuery, it is worth using in some cases, so you do this:
$(elem).bind('mousemove.ns1', funcOne); $(elem).bind('mousemove.ns2', funcTwo);
that way you can also unleash one by one
$(elem).unbind('mousemove.ns1'); $(elem).unbind('mousemove.ns2');
Or even
$(elem).unbind('.ns1');
vittore
source share