<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='docs.xsl'?>
<docs>
<method cat='DOM/Traversing' type='jQuery' short='Get a set of elements containing all of the unique siblings of each of the
matched set of elements.' name='siblings'>
<desc>Get a set of elements containing all of the unique siblings of each of the
matched set of elements.

Can be filtered with an optional expressions.</desc>
<params type='String' name='expr'>
<desc>(optional) An expression to filter the sibling Elements with</desc>
</params>
<examples>
<desc>Find all siblings of each div.</desc>
<before>&lt;p&gt;Hello&lt;/p&gt;&lt;div&gt;&lt;span&gt;Hello Again&lt;/span&gt;&lt;/div&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
<code>$("div").siblings()</code>
<result>[ &lt;p&gt;Hello&lt;/p&gt;, &lt;p&gt;And Again&lt;/p&gt; ]</result>
</examples>
<examples>
<desc>Find all siblings with a class "selected" of each div.</desc>
<before>&lt;div&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/div&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;&lt;p&gt;And Again&lt;/p&gt;</before>
<code>$("div").siblings(".selected")</code>
<result>[ &lt;p class="selected"&gt;Hello Again&lt;/p&gt; ]</result>
</examples>
</method></docs>
