jQuery to check if ID value has a number
<p>Is there a way in <strong>jQuery</strong> to check if an ID value (Ex. <code>id="number1"</code>) contains a number?</p>

<p>The idea would be:</p>

<p>if (ID has a number which will come from a variable) then do something.</p>

<p>this is what I came up with so far but it only works with the first div:</p>

<pre><code>    $("#tabsstyle li a").bind("click", function () {
        var numSlide = $(this).attr("rel");
        if ($('#slidesContainer div').attr('id').match(numSlide) ) {
        $('#slidesContainer div').fadeIn();
}
</code></pre>

<p>numSlide will store a number coming from one of the 'a' clicked and check that number will be included in the id value of '#slidesContainer div', once that checked then the right div will fadeIn.</p>

<p>HTML structure below:</p>

<pre><code>&lt;div id="slidesContainer"&gt;
  &lt;div id="n1" class="slide"&gt;
    &lt;h2&gt;Web Development Tutorial&lt;/h2&gt;
    &lt;p&gt;&lt;button class="test"&gt;N1&lt;/button&gt;&lt;/p&gt;

  &lt;/div&gt;
  &lt;div id="n2" class="slide"&gt;
    &lt;h2&gt;Grunge Brushes, Anyone?&lt;/h2&gt;
    &lt;p&gt;&lt;button class="test"&gt;N2&lt;/button&gt;&lt;/p&gt;

  &lt;/div&gt;
  &lt;div id="n3" class="slide"&gt;
    &lt;h2&gt;How About Some Awesome Grunge Textures?&lt;/h2&gt;
   &lt;p&gt;&lt;button class="test"&gt;N3&lt;/button&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="n4" class="slide"&gt;
    &lt;h2&gt;'Tis the End, My Friend.&lt;/h2&gt;
    &lt;p&gt;&lt;button class="test"&gt;N4&lt;/button&gt;&lt;/p&gt;
  &lt;/div&gt;



&lt;/div&gt;
</code></pre>
