Opened 13 years ago
Closed 13 years ago
#6416 closed bug (invalid)
IE7 parentsUntil returning siblings
Reported by: | ngless | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | traversing | Version: | 1.4.2 |
Keywords: | parentsUntil | Cc: | |
Blocked by: | Blocking: |
Description
I have a nested list of ul's and li's As so:
<ul id="lvl1">
<li id="asdf">txt<li> <ul id="lvl2">
<li id="asdf">txt<li> <ul id="lvl3">
<li id="asdf"> <input type="radio" value="1" title="checked" name="Path" id="1"> <li>
</ul>
</ul>
</ul>
I have a function to return the path:
function getpath(){
var $selected = $("input:checked"); var str = $selected.attr("id"); $selected.parentsUntil('#StructureTree').each(function() {
str = "\" + $(this).attr('id') + str;
}); return str;
}
I would expect to get "lvl1\lvl2\lvl3\checked" and DO in FF, IE8, Safari, Chrome... just not IE7.
in IE7 I get "lvl1\asdf\lvl2\asdf\lvl3\asdf\checked"
Your html is invalid; The id attribute must be unique in a document.