https://bugzilla.wikimedia.org/show_bug.cgi?id=31417
--- Comment #8 from Daniel Friesen <[email protected]> 2011-10-06 22:45:29 UTC --- (In reply to comment #7) > Thanks for the tips. Re: bug from pages with only hidden categories, > Wiktionary > entries aren't allowed to have only hidden categories. And .delegate runs > through .live (although using the additional arguments on .live is an > improvement, so I've fixed that). The problem with .live is it broadly attaches an event to the document root when you only need one local to a specific area. That's a waste of events being fired. Additionally because the selector is the query itself jQuery also goes and queries the whole dom for those nodes and never uses them. Additional arguments on live? Are you trying to make use of arguments defined as internal-only instead of properly using the .delegate interface provided to you? > Yes, it's probably faster because it's using > a document fragment, and document fragments don't have getElementsByTagName > functions. Which goes back to the need for the content holder to be accessible > from javascript... DocumentFragment doesn't have a getElementsByTagName. But it's children do. Insert your stuff into a dummy div instead of directly onto the fragment, and poof, getElementsByTagName. And if you don't want to do that then use `jQuery(fragment.childNodes).find('h2');`. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
