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