[jQuery] Re: Works with not() but not with filter()

2007-06-21 Thread Gordon
A bit of rearranging of the code allowed me to achieve the same effect without havign to pass an elements array to filter as shown below: elements = $('.globalClass'); elemsToAnimate = elements.not (unselectedArr); elementsToHide = elements.not (elemsToAnimate).not (':hidden'); elementsToShow = e

[jQuery] Re: Works with not() but not with filter()

2007-06-20 Thread Gordon
I'm trying to optimize some code that currently works by having one function add a class to elements that meet certain criteria and another function that applies effects to them based on the classes attached. I found that adding and removing classes was relatively slow so instead I want to build

[jQuery] Re: Works with not() but not with filter()

2007-06-20 Thread John Resig
Can you provide an example of the code? I'm not sure what you're trying to do from your description. (If I had to guess, I'd say that you're trying to pass an element to filter, but I'm not sure why.) --John On 6/20/07, Gordon <[EMAIL PROTECTED]> wrote: If I build up a list of elements by pus