jQuery: Ticket #10562: siblings method returns unexpected elements when using Sizzle-invoking pseudo-selectorshttps://bugs.jquery.com/ticket/10562
<p>
When using a selector including a pseudo-selector that requires Sizzle with the <code>siblings</code> method, unexpected elements are returned.
</p>
<p>
Given the following markup:
</p>
<pre class="wiki">&lt;div id="d1"&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span&gt;&lt;/span&gt;
&lt;/div&gt;
</pre><p>
And the following jQuery:
</p>
<pre class="wiki">$("#d1").siblings("div span:last");
</pre><p>
You would expect that an empty set be returned, as there are no <code>span</code> siblings of <code>#d1</code>. However, the <code>div</code> containing the <code>span</code> is returned.
</p>
<p>
<a class="ext-link" href="http://jsfiddle.net/Yd49H/9/"><span class="icon">​</span>JSFiddle example</a>. Reproduced in Chrome 14, Firefox 7 and IE9.
</p>
<p>
<a class="ext-link" href="http://stackoverflow.com/questions/7818490/pseudo-selectors-with-siblings-method"><span class="icon">​</span>Related StackOverflow question</a>
</p>
en-usjQuery//jquery.com/images/logo.gifhttps://bugs.jquery.com/ticket/10562
Trac 1.2.3dmethvinSun, 23 Oct 2011 15:00:15 GMTpriority, status, component, milestone changed; resolution sethttps://bugs.jquery.com/ticket/10562#comment:1
https://bugs.jquery.com/ticket/10562#comment:1
<ul>
<li><strong>priority</strong>
changed from <em>undecided</em> to <em>low</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>component</strong>
changed from <em>unfiled</em> to <em>selector</em>
</li>
<li><strong>milestone</strong>
changed from <em>None</em> to <em>1.7</em>
</li>
</ul>
<p>
Appears to work as you've described in the latest jQuery-git version so it should be fixed in 1.7.
</p>
Ticket