Side navigation
#4254 closed bug (invalid)
Opened February 26, 2009 10:37AM UTC
Closed February 27, 2009 12:52AM UTC
Traversing not finding siblings within paragraphs
Reported by: | ncrossland | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When traversing elements which are contained within a paragraph, the P's child elements are not being treated as children.
In the following test case, nextAll should find the same siblings each time. But, whenever the link's parent is a P, it fails.
<script type="text/javascript">
$( function() {
$('.feed').each(function(i) {
console.log('Iteration: '+i);
console.log( $(this).nextAll('div.feedTemplate') );
});
});
</script>
<p>
<a href="#" class="feed">Link</a>
<div class="feedTemplate">Paragraph</div>
</p>
<p><div>
<a href="#" class="feed">Link</a>
<div class="feedTemplate">Paragraph and DIV</div>
</div></p>
<div><p>
<a href="#" class="feed">Link</a>
<div class="feedTemplate">DIV and Paragraph</div>
</p></div>
<div>
<a href="#" class="feed">Link</a>
<div class="feedTemplate">DIV</div>
</div>
<span>
<a href="#" class="feed">Link</a>
<div class="feedTemplate">SPAN</div>
</span>
This may be because putting a DIV inside a P is invalid under XHTML 1 strict??