Get element value and then subtract by 1?
<pre><code>&lt;span id="tcount-1"&gt;100&lt;/span&gt;  
&lt;span id="tcount-2"&gt;100&lt;/span&gt;
&lt;span id="tcount-3"&gt;100&lt;/span&gt;
</code></pre>

<p>What I am trying to do is grab the value within span id=tcount-X (where X can be any ID value) and then subtract 1 from it.  </p>

<p>So I know I can easily hide the value by doing...</p>

<pre><code>$('span#tcount-' + com_id).hide();
</code></pre>

<p>but as soon as I do something like...</p>

<pre><code>var countit = $('span#tcount-' + com_id).val();
</code></pre>

<p>... it breaks.  Any ideas what I'm doing wrong?</p>
