Re: [Rails-spinoffs] Get Elements Within ID

2006-07-03 Thread Thomas Fuchs
"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,

Re: Re: [Rails-spinoffs] Get Elements Within ID

2006-07-03 Thread 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 r

RE: [Rails-spinoffs] Get Elements Within ID

2006-07-03 Thread Maninder, Singh
s.org Subject: Re: [Rails-spinoffs] Get Elements Within ID 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

Re: [Rails-spinoffs] Get Elements Within ID

2006-07-03 Thread Andrew Kaspick
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?

RE: [Rails-spinoffs] Get Elements Within ID

2006-07-03 Thread Maninder, Singh
How about using the $$ selector? Find all span elements inside 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/lis

Re: [Rails-spinoffs] Get Elements Within ID

2006-07-03 Thread Andrew Kaspick
So how would I loop over those childNotes and only touch the SPANs? Thanks! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Kaspick Sent: Monday, July 03, 2006 1:51 AM To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] Get E

RE: [Rails-spinoffs] Get Elements Within ID

2006-07-02 Thread Daniel Elmore
To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] Get Elements Within ID Well, $('abc').childNodes will get you the 3 tags you mention, but do you also want possible children of those tags too? On 7/3/06, Daniel Elmore <[EMAIL PROTECTED]> wrote: > Is th

Re: [Rails-spinoffs] Get Elements Within ID

2006-07-02 Thread Andrew Kaspick
Well, $('abc').childNodes will get you the 3 tags you mention, but do you also want possible children of those tags too? On 7/3/06, Daniel Elmore <[EMAIL PROTECTED]> wrote: Is there a function that returns all the elements of a particular tag within a particular ID. Example:

[Rails-spinoffs] Get Elements Within ID

2006-07-02 Thread Daniel Elmore
Is there a function that returns all the elements of a particular tag within a particular ID. Example: Now I want all the SPAN elements under ID "abc". Also would the SPAN tags need an ID themselves? Thanks! ___ Rails-spi