Skip to content

Commit 165bc39

Browse files
Boldewynarthurvr
authored andcommitted
siblings: explain that original elements might be returned as well
Ref jquery/jquery#2149 Closes gh-678
1 parent 1f2d27f commit 165bc39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entries/siblings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
$( "li.third-item" ).siblings().css( "background-color", "red" );
2727
</code></pre>
2828
<p>The result of this call is a red background behind items 1, 2, 4, and 5. Since we do not supply a selector expression, all of the siblings are part of the object. If we had supplied one, only the matching items among these four would be included.</p>
29-
<p>The original element is not included among the siblings, which is important to remember when we wish to find all elements at a particular level of the DOM tree.</p>
29+
<p>The original element is not included among the siblings, which is important to remember when we wish to find all elements at a particular level of the DOM tree. However, if the original collection contains more than one element, they might be mutual siblings and will both be found. If you need an exclusive list of siblings, use <code>$collection.siblings().not($collection)</code>.</p>
3030
</longdesc>
3131
<example>
3232
<desc>Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate).</desc>

0 commit comments

Comments
 (0)