Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#6279 closed bug (duplicate)

next adjacent selector and/or child selector in IE6

Reported by: Timmy Willison Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.4.2
Keywords: next adjacent selector ie6 ie7 Cc:
Blocked by: Blocking:


I'm sorry I can't provide a test case. I need to leave the fixed version on our dev sites. But I can change the code back and forth. I'm sure it would be easy to create a test case. You can tell what the structure of my DOM is from the following code (glass-top is a select element, breed is an input element elsewhere on the page, and everything below is contained inside a div). Like so:

Markup: <div>

<select id="glass-top"/> <input/> <span/> <ul>




Original JS (works in all browsers except IE6): showHideBreed : function() {

$('#breed').hide(); $('#glass-top + input + span + ul > li').click(function() {

if($(this).attr('value') == 410) {


} else {





Working JS: showHideBreed : function() {

$('#breed').hide(); $('#glass-top').next().next().next('ul').find('li').click(function() {

if($(this).attr('value') == 410) {


} else {





I just thought you should know. It's possible that using the '+' selector multiple times in a row is causing problems in IE6? I'm not sure. I don't think the '>' child selector is the culprit because I tried replacing just that with find('li') and got the same result. I haven't looked at the jQuery source yet, but I thought I should go ahead and make the ticket.

Thanks guys, Timmy

Attachments (1)

next-adjacent.htm (1.4 KB) - added by roydukkey 13 years ago.
Next Adjacent Selector Fails IE6 and IE7

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by roydukkey

Attachment: next-adjacent.htm added

Next Adjacent Selector Fails IE6 and IE7

comment:1 Changed 13 years ago by roydukkey

I too have found this bug and can add some useful information. Attached is a test case.

It seems that in $("#btnAPI + ul li a") the next adjacent selector is failing in ie6 and ie7. However, if you try to select the element via the next() and find() functions, all is well. ie. $("#btnAPI").next("ul").find("li a").

The next adjacent selection was working in version 1.3.2.

comment:2 Changed 13 years ago by dmethvin

Component: unfiledselector

comment:3 Changed 12 years ago by snover

Milestone: 1.4.3

Resetting milestone to future.

comment:4 Changed 12 years ago by snover

Priority: high
Status: newopen

test case also problematic in ie7, so a problem with Sizzle.

comment:5 Changed 12 years ago by danheberden

Milestone: 1.next

Still present in ie6 and ie7 in 1.5.2pre

comment:6 Changed 12 years ago by danheberden

Keywords: ie6 ie7 added; IE6 removed

comment:7 Changed 12 years ago by Timmy Willison

Resolution: duplicate
Status: openclosed

Closing in favor of ticket assigned to John. Good-bye my first ticket! Nobody look at how I pasted code in ticket...

comment:8 Changed 12 years ago by Timmy Willison

Duplicate of #7528.

Note: See TracTickets for help on using tickets.