Bug Tracker

Modify

Ticket #11754 (closed bug: worksforme)

Opened 12 months ago

Last modified 12 months ago

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

comment:1 Changed 12 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.