Maybe
it's only valid if there's something before it? Otherwise you're trying to
select a child of nothing?
<!----------------//------
andy matthews
web
developer
certified advanced coldfusion programmer
ICGLink,
Inc.
[EMAIL PROTECTED]
615.370.1530
x737
--------------//--------->
-----Original Message-----Why "> div.item" is not a valid selector? According to CSS Spec( http://www.w3.org/TR/CSS2/selector.html#child-selectors ), that is a
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Realazy XA Chen
Sent: Friday, August 11, 2006 9:29 AM
To: jQuery Discussion.
Subject: Re: [jQuery] newbie question
Child selector.
2006/8/11, Klaus Hartl <[EMAIL PROTECTED]>:
Steve Clay wrote:
> Thursday, August 10, 2006, 8:59:42 PM, Realazy XA Chen wrote:
>> $(".panel").click(function(){
>> $("> div.item",this).todosomethinghere();
>> })
>
> "> div.item" isn't a valid selector. If jQuery doesn't fail it probably
> should be considered a bug. "div.item" is all that's needed.
>
It isn't a valid CSS selector, but I think it works in jQuery and
shouldn't be considered as a bug.
In some cases you may have to do something like the following:
$(this).find('> p') ...
I cannot think of another way to do that.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
realazy.org
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
