Could you put an example up? That would certainly help to debug the problem (I suspect that this problem is largely markup dependent).
--John On Thu, Jan 29, 2009 at 8:02 AM, Diego Perini <diego.per...@gmail.com> wrote: > > I have just gone through a problem in code that seems related to live > (). > > A coworker has just shifted from bind() to live() in a page where many > UL / LI / A (probably a hundred of them). > > The anchors are just internal page jumps, there are counters for each > click on them. The user have to follow a specific path through them > and get a score. > > The event types for which he did the change are only "mouseover" and > "mouseout", also he will need to do the same for "click"s, he just > stopped when he saw that a few seconds interaction with that page will > slow down his processing. > > I looked at the code and suggested to put the minimum necessary in the > live() callbacks, we finished up testing with this bare minimum: > > $('ul li a').live('mouseover', function (e) { > e.target.style.backgroundColor = 'red'; > }); > > $('ul li a').live('mouseout', function (e) { > e.target.style.backgroundColor = ''; > }); > > the hover effect still works as expected on all the links but the > problem still happen in the main code, it is not visible initially > since the slow down is increasing few hundreds milliseconds for each > triggering of the events, > after a minute interacting the browser spit the warning "The script is > taking to much time....". > > He does not have the same trouble with bind() at least the problem > does not show up. > > Are there quirks or suggestion in how to better isolate and debug the > problem in live() ? > > Diego > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---