Hi Dan,

Thanks for the info. I'm working on increasing the specificity of the selectors, but it's still too many darn dom elements. There might be 3000 bindings that need to happen. Next step is to do the old fashioned binding right in the html.

-- Josh

----- Original Message ----- From: "Dan G. Switzer, II" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
Sent: Friday, July 20, 2007 12:41 PM
Subject: [jQuery] Re: Long running script IE6, help!



Josh,

Klaus' post is a good example of the "specifity" I was referring to in my
post. Basically writing selectors that are much more specific and allow
jQuery to do less parsing work.

-Dan

Haven't tested in IE but took a quick look at your script. You could
speed up your queries if that is the problem. Instead of $(".additem")
add a type selector. Assuming that element in question is an anchor:

$('a.additem')

That reduces the number of elements that have to be searched through for
a class. In case of the selector '.additem' it is every single element
in the document.

Even better if you have context...:

$('#fragmentofpage a.additem')

or if you want to reuse that context:

var context = $('#fragmentofpage');

$('a.additem', context)...
$('a.otheritem', context)...


--Klaus


Reply via email to