Bug Tracker


Ticket #6104 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

Child-selector work incorrectly

Reported by: Octane Owned by:
Priority: low Milestone: 1.4
Component: selector Version: 1.4
Keywords: selector Cc:
Blocking: Blocked by:





············<span><!-- If this <span> does not exist, then the <a> will be found. -->


····················<a href="#">a</a>





<script type="text/javascript">

alert($("body > span a").size()); 0 — elements not found!



Change History

comment:1 Changed 4 years ago by addyosmani

  • Priority set to low
  • Status changed from new to closed
  • Resolution set to invalid

Tested the above in the latest versions of Chrome, Safari, FireFox and IE. The output in each is 1 not 0. It's possible that the original submission may have been using an older version of jQuery.

Live test case:  http://jsfiddle.net/DbTvy/

Please re-submit your ticket to confirm what browser you were using when testing this bug so that we can perform more tests on that specific browser version.

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


Add a comment

Modify Ticket

as closed

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

Note: See TracTickets for help on using tickets.