"Premature optimization is the root of all evil." -Hoare and Knuth :)
Am 03.07.2006 um 10:46 schrieb Jon Tirsen:
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
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
--
Thomas Fuchs
wollzelle
http://www.wollzelle.com
questentier on AIM
madrobby on irc.freenode.net
http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs