Sum instead of concatenation
<p>I have my code</p>

<pre><code>sum=parseFloat($('input[name=fieldname]').val()) * 60 + 
parseFloat($('input[name=fieldname]').val()) + 
(($('input[name=fieldname]').val()) /60).toFixed(2).
</code></pre>

<p>It get's the values from felds where I enter duration and it should give me the sum in minutes.
The problem is that the sum I get concatenates the 3 fields instead of returning the number of minutes.</p>

<p>Eg: for 1 hours and 20 minutes I get 6020 instead of (60+20) 80</p>

<p>Edit: The code above is the generic form, here is the exact code.</p>

<pre><code>var sum = parseFloat($('input[name="&lt;?php esc_attr_e( $field-&gt;field_id ); ?&gt;hrs"]').val())*60 +
parseFloat(($('input[name="&lt;?php esc_attr_e( $field-&gt;field_id ); ?&gt;mins"]').val()) + 
parseFloat($('input[name="&lt;?php esc_attr_e( $field-&gt;field_id ); ?&gt;secs"]').val())/60).toFixed(2) 
</code></pre>
