Side navigation
#4028 closed bug (wontfix)
Opened January 29, 2009 08:45PM UTC
Closed July 11, 2011 06:18PM UTC
".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
1. The selector '$(".className:not(:first)").length)' returns one too many elements in IE.
2. 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 (8)
Changed January 30, 2009 12:57AM UTC by comment:1
Changed October 16, 2009 01:35PM UTC by comment:2
Confirmed in IE8 RTM (8.0.6001.18702).
Changed November 19, 2010 02:35AM UTC by comment:3
status: | new → open |
---|
Changed February 26, 2011 06:38PM UTC by comment:4
+1 had this issue too.
Changed March 11, 2011 07:34PM UTC by comment:5
This problem is still present: jQuery 1.5.1
Testcase: http://jsfiddle.net/laubstein/rU4h4/
Changed March 30, 2011 09:20PM UTC by comment:6
milestone: | 1.3.2 → 1.next |
---|
Changed July 11, 2011 06:18PM UTC by comment:8
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.
Confirmed; it behaves the same way in IE8RC1, with a name other than className, and using
instead of .