I think $$ could very well be fast enough for what you want to do.
Never trade off performance against developer productivity unless you
have a very good reason to do it.

On 7/3/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:
I would have to think that $('abc').getElementsByTagName('span') would
run faster than making use of $$.

$$ would have to evaulate the entire document.  Starting at a known
parent should be much much faster.


On 7/3/06, Maninder, Singh <[EMAIL PROTECTED]> wrote:
> How about using the $$ selector?
>
>
> Find all span elements inside <div> with id "abc".
>
>  $$('div#abc span').each(function(el) {
>    //do something
>  });
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to