Ticket #11754 (closed bug: worksforme)
Descendant selector not working as expected
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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?
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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.