Are you sure you meant :has([id])? That would find all fieldsets that have a descendant that has an ID attribute (which is pretty costly). It sounds like you could replace that line with:
jQuery(this).closest("fieldset[id]") --John On Wed, Feb 18, 2009 at 11:34 AM, GreyCells <oldgreyce...@googlemail.com> wrote: > > I'm sure this is not the most elegant line of code, but in 1.2.6, > there was no performance hit (i.e. a moderately complex page/form > loaded in the blink of an eye). In 1.3.1 this now takes > 10 seconds > with 100% cpu: > > var parentWithIdAttribute = jQuery(this).parents('fieldset:has > ([id]):first').attr('id'); > > This is used to determine the context of a bunch of labels and legends > within a selector.each(). > > Commenting out this single line restores the performance (but > obviously breaks my app). > > Not sure whether I should raise this as a bug...? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---