I recently created a grid with ~1000 squares and each set a click
event handler to each.
$(".sq").bind("click", myfunc )
Needless to say, it was extremely slow. Thankfully I could simply
switch to event delegation and far better performance by simply
switching to the following:
$(".sq").live("click", myfunc )
Rock on 1.3.1 !
So my question : - Is there any reason *not* to use live event
handlers for pretty much everything ? (other than of course the events
and selectors that don't work).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---