Skip to main content

Bug Tracker

Side navigation

#11754 closed bug (worksforme)

Opened May 11, 2012 04:01PM UTC

Closed May 11, 2012 04:37PM UTC

Descendant selector not working as expected

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

I expect $('form>div span') would select all spans in such document:

<body>

<form name="form1" method="post" action="someform.aspx" id="form1">

<div>

<div>

<span> Language of Mailing</span>

</div>

<div>

<span style="border:1px solid red">Client Mailing Address</span> 1251 WestWind Av.

</div>

<div>Agreement</div>

<div>sth1.</div>

<div>sth2.</div>

<span>Laser Beam</span>

<div>

<input type="submit" name="Button1" value="Submit" id="Button1" />

<input type="submit" name="Button2" value="Clear" id="Button2" />

</div>

</div>

</form>

</body>

but it can only select this element

<span>Laser Beam</span>

is it a problem?

Attachments (0)
Change History (1)

Changed May 11, 2012 04:37PM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

I am glad to hear that jQuery is meeting your expectations! http://jsfiddle.net/2Zr9G/

You can learn a lot more about jQuery on a forum such as StackOverflow or our own http://forum.jquery.com.