jquery multiply the value of span and get the total
<p>i was trying to multiply the answers of my span.</p>

<p>for example the value <code>&lt;span id="total_f"&gt;210&lt;/span&gt;</code></p>

<p>and the btw <code>.21</code> it was %21 percent so we need to make it <code>.21</code> to multiply it and get the total. <code>btw</code> is <code>VAT</code> in netherlands</p>

<p>if you see the jquery <code>var get_total</code> i did multiply the <code>mul</code></p>

<p>is my jquery wrong?</p>

<p>this is my jquery</p>

<pre><code>$(document).ready(function(){
   var sum = 0;
   $('input[name=sumof]').each(function(){
        sum += parseInt($(this).val());
   });
   $('input[name=total_f]').val(sum);
   $('#total_f').text(sum);

   var mul = parseInt($('input[name=total_f]').val());

   var get_total = mul * parseInt($('input[name=btw]').val());

   $('input[name=s_btw]').val(get_total);
   $('#s_btw').text(get_total);
});
</code></pre>

<p>my html</p>

<pre><code>&lt;table cellpadding="5" cellspacing="0" width="100%"&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Sub Total&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;
        &lt;?php
            if ( $get_total_computation['currency'] == 'euro' ) {
                $msg_tot = '&amp;euro;';
            } elseif ( $get_total_computation['currency'] == 'usd' ) {
                $msg_tot = '&amp;#36;';
            }
            echo $msg_tot;

        ?&gt;                      
            &lt;span id="total_f"&gt;&lt;/span&gt;
            &lt;input type="hidden" name="total_f" value="" /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;?
            echo $get_total_computation['quo_btw'];
            $get_per = explode( '%', $get_total_computation['quo_btw']);
            ?&gt;
            &lt;input type="hidden" name="btw" value=".&lt;?=$get_per[0];?&gt;" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;span id="s_btw"&gt;&lt;/span&gt;
            &lt;input type="hidden" name="s_btw" value="" /&gt;
         &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?=$btw;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>
