title: Selecting all last elements that are not the last sibling
body: <p>I have a structure similar to the following one:</p>
  
  <pre><code>&lt;p&gt;
     &lt;span class="top"&gt;1&lt;/span&gt;
     &lt;span class="top"&gt;2&lt;/span&gt;
     &lt;span&gt;3&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;
     &lt;span class="top"&gt;4&lt;/span&gt;
     &lt;span class="top"&gt;5&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;
     &lt;span class="top"&gt;6&lt;span&gt;
     &lt;span&gt;7&lt;/span&gt;
     &lt;span&gt;8&lt;/span&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>I want to append something to the last <code>&lt;span&gt;</code> of class <code>top</code>, but only if it is not the last element in the paragraph. In other words, there should be another <code>span</code> without class <code>top</code> as a sibling after it. </p>
  
  <p>The result should be that elements 2 and 6 are altered, the other <code>span</code>s are either not the last or there are no following items.</p>
  
  <p>I tried the following, but it didn't work:</p>
  
  <pre><code>$('span.top:last-child').not('span:last-of-type').append('...');
  </code></pre>