Modify ↓
Ticket #3846 (closed bug: duplicate)
Selector "#elementId a" failed on Chrome
| Reported by: | felix_halim | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.1 |
| Component: | selector | Version: | 1.3 |
| Keywords: | ID descendant | Cc: | |
| Blocking: | Blocked by: |
Description
<script src="jquery-1.3.min.js"></script>
<script> $(function(){
alert($('#elementId a').length);
}); </script>
<div id="elementId">
<a>test</a>
</div>
In Chome, the alert is "0" while in Firefox is "1". The correct one is "1".
Attachments
Change History
comment:1 Changed 4 years ago by balazs.endresz
It's a bug in webkit's querySelectorAll: http://groups.google.com/group/jquery-dev/msg/69281215fd811996 but works with proper doctype!
duplicate: http://dev.jquery.com/ticket/3840
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

