> If your page contains many elements, then using a context might speed up the 
> search for classes: $('.myclass',$('#commonAncestor')[0]).

And if you know that the elements with the class "myclass" are only of 
one type, you can speed that up a little more:

$('p.myclass', $('#commonAncestor')[0]);

Maybe there are two different types of elements belonging to that class, 
I could imagine that the following is still faster:

$('p.myclass, h2.myclass', $('#commonAncestor')[0]);

But that depends on the number of elements I guess.


-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to