Bug Tracker

Opened 11 years ago

Closed 11 years ago

#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:
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?

Change History (1)

comment:1 Changed 11 years ago by dmethvin

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.

Note: See TracTickets for help on using tickets.