title: jQuery :not() + nth-child
body: <p>Having the following DOM structure:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li class="click_here"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li class="click_here"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li class="click_here"&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I´m trying to add class "last" every 5 "li", but excluding the ones having class "click_here".</p>
  
  <p>I´ve found out that this is not working:</p>
  
  <pre><code>$('ul li:not(.click_here)').filter(':nth-child(5n)').addClass('last');
  </code></pre>
  
  <p>I´ve also tried several ways of doing it, like:</p>
  
  <pre><code>$('ul li').filter(':not(.click_here)').filter(':nth-child(5n)').addClass('last');
  $('ul li').not($('.click_here')).filter(':nth-child(5n)').addClass('last')
  </code></pre>
  
  <p>It doesn´t seem to skip "li" items having class "click_here".</p>
  
  <p>So I´ve finally had to do it like this:</p>
  
  <pre><code>        $.each($('ul li').filter(':not(.click_here)'),function(i,v){
              if((i+1)%5 == 0) $(this).addClass('last');
          });
  </code></pre>
  
  <p>Does any of you know by any chance what am I doing wrong in my first approaches?</p>
  
  <p>Many thanks!</p>