title: jquery nth child that is currently visible
body: <p>I can style every 4th 'item' div like so</p>
  
  <pre><code>  jQuery(".item:nth-child(4n)").addClass("fourth-item");
  </code></pre>
  
  <p>and that works fine, but then I hide some items, show some others and want to re-do this styling, but only styling every 4th item that is visible. So I have a function that will remove this styling and reapply it, but I need to specify in the reapplying of the style that it is only every 4th visible item, not every 4th item. I know the ":visible" selector but can't seen to chain it with the nth-child selector properly, any ideas?</p>
  
  <p>I've tried various things like this to no avail...</p>
  
  <pre><code>jQuery(".item").removeClass("fourth-item");
  jQuery(".item:visible:nth-child(4n)").addClass("fourth-item");
  </code></pre>