thanks, everyone, for the suggestions and questions.
regarding Yehuda's suggestion:
$(".class > .otherClass tr#id td#id") into $("#id").filter(".class
> .otherClass tr#id td")
a small clarification: If #id is an ancestor of .class, we'd probably
want to use .find() instead of .filter() . . .
$('#id').find('.class > .otherClass tr#id td')
Also, a hat tip to Aaron Heimlich, who blogged about this issue,
unbeknownst to me at the time, before I did.
http://aheimlich.freepgs.com/javascript/jquery-selector-speed/
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Dec 17, 2006, at 8:53 AM, Yehuda Katz wrote:
It was a typo. My apologies.
A more robust solution might be to use filter:
$(".class > .otherClass tr#id td#id") into $("#id").filter(".class
> .otherClass tr#id td")
On 12/17/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
Felix Geisendörfer schrieb:
> Quick question:
>> $(".class > .otherClass tr#id td#id") into $("#id").id(".class >
>> .otherClass tr#id td")
> Does this work? Or should the function be 'is' not 'id'?
>
> $(".class > .otherClass tr#id td#id") into $("#id").is(".class >
> .otherClass tr#id td")
>
> I'm just wondering because I thought the 'id' function is used to
set
> the 'id' attribute of an element.
I think that's a typo. Still it's not the same, because is() returns a
boolean.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/