title: jQuery ID Number Range
body: <p>I am trying to write a jQuery script that will add a class to list items within a certain ID range. I use numbers in my ID's and want to adjust a range of ID's.</p>
  
  <pre><code>&lt;li id="item-15"&gt;Something&lt;/li&gt;
  &lt;li id="item-16"&gt;Something&lt;/li&gt;
  &lt;li id="item-17"&gt;Something&lt;/li&gt;
  &lt;li id="item-18"&gt;Something&lt;/li&gt;
  &lt;li id="item-19"&gt;Something&lt;/li&gt;
  </code></pre>
  
  <p>I want to add a class to say items 16 through 19. How would I do this?</p>
  
  <pre><code>jQuery('li#item-[16-19]).addClass('the-class');
  </code></pre>
  
  <p>I am not really sure how to do it. Maybe <code>.each()</code>?</p>