Open
Description
In jQuery, the addSelf() method puts the 'self' element into the stack in document order; in QueryPath, it seems to be adding it to the end. Example:
<p class="class-1">This is first</p>
<p class="class-2">This is second</p>
<p class="class-3">This is third</p>
<p class="class-4">This is last</p>
in jQuery, $('.class-1').nextUntil('.class-4').andSelf().wrapAll('<div class="NewWrapper"/>')
gives me
<div class="NewWrapper">
<p class="class-1">This is first</p>
<p class="class-2">This is second</p>
<p class="class-3">This is third</p>
</div>
<p class="class-4">This is last</p>
in QueryPath, the equivalent $qp->find('.class-1')->nextUntil('.class-4')->andSelf()->wrapAll('<div class="NewWrapper"/>')
returns
<div class="NewWrapper">
<p class="class-2">This is second</p>
<p class="class-3">This is third</p>
<p class="class-1">This is first</p>
</div>
<p class="class-4">This is last</p>
Metadata
Metadata
Assignees
Labels
No labels