Opened 14 years ago
Closed 12 years ago
#4028 closed bug (wontfix)
".className:not(:first)." incorrect in IE
Reported by: | bryfox | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.next |
Component: | selector | Version: | 1.3.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
- The selector '$(".className:not(:first)").length)' returns one too many elements in IE.
- The selector '$("div.className:not(:first)").length)' returns one too many elements in IE if the className divs are inside a containing div.
Tested in IE6 and IE7 under windows XP, jQuery 1.3.1. (No problem with 1.2.6.)
Example markup:
<div> <div class="className"></div> <div class="className"></div> </div> <script> $("div.className:not(:first)").length); // == 2 in IE $(".className:not(:first)").length); // == 2 in IE </script>
Attachments (1)
Change History (9)
Changed 14 years ago by
Attachment: | ie_selector_bug.html added |
---|
comment:1 Changed 14 years ago by
Confirmed; it behaves the same way in IE8RC1, with a name other than className, and using .ready()
instead of document.write
.
comment:5 Changed 12 years ago by
This problem is still present: jQuery 1.5.1
Testcase: http://jsfiddle.net/laubstein/rU4h4/
comment:6 Changed 12 years ago by
Milestone: | 1.3.2 → 1.next |
---|
comment:8 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | open → closed |
This isn't something that we're going to fix: http://docs.jquery.com/Won%27t_Fix
You should use .slice(1) instead.
Note: See
TracTickets for help on using
tickets.
Test case