Untitled Snippet

Send Snippet To: Save this snippet to Code Collector Pro -- view all lumpo's snippets
language: Javascript
license: Other

Code for Snippet:

var totalUnitPrice = 0;
$('.unitprice').each(function(index) {
    totalUnitPrice += parseInt($(this).val()); // parse the value to an Integer (otherwise it'll be concatenated as string) or use parseFloat for decimals
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 349
Date Added: 2015-02-07 20:30:24
Last Modified: 2015-02-07 13:30:37

Web Analytics