Sam Collett wrote:
> 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
>   
Agreed -- better thought, better looking. I was just trying to 
demonstrate that the selector can be assigned a scope & figure 
doc.getelementbyID should be clear to those familiar w/ Javascript.

~ Brice

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to