strip part of a filename with jquery/js
<p>I am using the code below to send an ID to my page:</p>

<p>The image names will always look like this
12.jpg
12-1.jpg
12-2.jpg 
12-3.jpg e.t.c</p>

<p>I need to alter the line below so it will only send the 12 not the -1,-2,-3 e.t.c My code below already removes the .jpg part</p>

<pre><code>var id = $(this).attr('src').split('/').pop().replace('.jpg','');
</code></pre>
