On 15/02/07, Brice Burgess <[EMAIL PROTECTED]> wrote:
> On 2/15/07, *Angelo Sozzi* <[EMAIL PROTECTED] <mailto:[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 regardless of
> >     the table
> >     they are in. So I went for:
> >
>
> You can limit the "scope" to a particular table via;
>
> $('.stripMe li:even',document.getElementByID('table')).addClass('alt');
>   for instance.
>
> ~ Brice

Why not just like this (which would probably be quicker as well).
$("#myid.stripeme li:even").addClass("alt")

With jQuery, you don't need to use getElementById or getElementsByTagName

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to