Loop through all elements with class 'blah' and find the highest id value
<p>I have a bunch of elements like:</p>

<pre><code>&lt;div id="car-123" class="blah"&gt;..&lt;/div&gt;
</code></pre>

<p>I want to loop through all of them and get the highest ID i.e. 123</p>

<p>how to do this?</p>

<p>Is below correct and the best way?</p>

<pre><code>$(".blah").each(function() {

   var id = $(this).attr('id').split('-')[0];

   if( id &gt; newid)
      newid = id;

});
</code></pre>
