I want to improve this code http://jsfiddle.net/QmTNZ/30/ to use comma separated price in place of the point
as you we can seem when we use for example 1 x 375,5 I get 375 in the Sum and not 375,5
My code:
function ca(){
var $overall = 0;
$("tr.sum").each(function() {
var $qnt = $(this).find(".qty");
var $price = $(this).find("td").eq(1);
console.log($qnt + " | " + $price);
var sum = parseFloat($price.text()) * parseFloat($qnt.val());
if(isNaN(sum)) {
sum = 0;
}
$(this).find("td").eq(2).text(Math.round(sum * 100) / 100);
$overall += sum;
});
$("#total").text($overall);
}
$(function() {
ca();
$('input.qty').bind('change keyup',function(){ca();});
});