Side navigation
#3403 closed bug (invalid)
Opened September 24, 2008 07:42AM UTC
Closed September 24, 2008 05:00PM UTC
Traversing lists upward causes failed selection in IE6
Reported by: | bravesirrobin | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | selector | Version: | 1.2.6 |
Keywords: | prev, list, nested lists, parent | Cc: | bravesirrobin, flesler |
Blocked by: | Blocking: |
Description
Here's a sample of a case I encountered in development.
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
var firstText = $("#testId").text();
var secondText = $("#testId").parent().prev().text();
alert(firstText+", "+secondText);
});
</script>
</head>
<body>
<ul>
<li>Bar</li>
<ul>
<li>Things</li>
<li id="testId">Stuff</li>
</ul>
<li>Baz</li>
<ul>
<li>Text</li>
<li>Misc</li>
</ul>
</ul>
</body>
</html>
In latest Firefox, Safari, Opera, the alert is "Stuff, Bar", but in IE6 this is "Stuff, ". It's like the DOM structure for IE6 is somehow different for nested ULs. Didn't have IE7 handy, but that would be something to check as well.
Attachments (0)
Change History (1)
Changed September 24, 2008 05:00PM UTC by comment:1
cc: | → bravesirrobin, flesler |
---|---|
resolution: | → invalid |
status: | new → closed |
The top <ul> has some children <ul>'s. That's illegal html.