Re: [jQuery] Table striping, speed question

2007-02-15 Thread Brice Burgess
Sam Collett wrote: > On 15/02/07, Brice Burgess <[EMAIL PROTECTED]> wrote: > >> On 2/15/07, *Angelo Sozzi* <[EMAIL PROTECTED] > >> wrote: >> >>> Just a minor (nice to know) question: >>> When stripping multiple tables or lists on a single page >>>

Re: [jQuery] Table striping, speed question

2007-02-15 Thread Sam Collett
On 15/02/07, Brice Burgess <[EMAIL PROTECTED]> wrote: > On 2/15/07, *Angelo Sozzi* <[EMAIL PROTECTED] > > wrote: > > > > > > Just a minor (nice to know) question: > > When stripping multiple tables or lists on a single page > > $(.stripMe li:even).addClass

Re: [jQuery] Table striping, speed question

2007-02-15 Thread Angelo Sozzi
Thanks, But that was really what I was looking for see: http://www.ehs.sfu.ca/AtoZ/indexUL_all.htm (click on all) multiple lists with the same .stripMe class just to add strips. But $(.stripMe li:even).addClass('alt'); would not always start with a non striped item, hence the use of each or n

Re: [jQuery] Table striping, speed question

2007-02-15 Thread Brice Burgess
On 2/15/07, *Angelo Sozzi* <[EMAIL PROTECTED] > wrote: > > > Just a minor (nice to know) question: > When stripping multiple tables or lists on a single page > $(.stripMe li:even).addClass('alt'); > won't work as it itterates over all the li element reg

Re: [jQuery] Table striping, speed question

2007-02-15 Thread Yehuda Katz
nth-child is very fast. Probably faster than the each method. -- Yehuda On 2/15/07, Angelo Sozzi <[EMAIL PROTECTED]> wrote: Just a minor (nice to know) question: When stripping multiple tables or lists on a single page $(.stripMe li:even).addClass('alt'); won't work as it itterates over a

[jQuery] Table striping, speed question

2007-02-15 Thread Angelo Sozzi
Just a minor (nice to know) question: When stripping multiple tables or lists on a single page $(.stripMe li:even).addClass('alt'); won't work as it itterates over all the li element regardless of the table they are in. So I went for: $('.stripMe').each(function(i) {$("li:odd", this).addC