-1
In this code I have, when value reaches 200.00... it shows 200, when it has decimal places, it shows decimal places... 200.55 = 200.55
However, I need him to show both decimals even if it’s "10.00", "00" after the point...
another thing is that I need to appear "," from time to time on the website print
I thought I’d put it, but I don’t know where I’d put it...
total = parseFloat(total.toFixed(2));
jQuery(document).ready(function() {
jQuery('select[name="service[]"]').change(function() {
let selects = jQuery("select[name=\"service[]\"]");
let total = 0;
/* Percorre todos os select */
$(selects).map(function(i, e) {
let values = $(e).find(":selected");
/* Percorre todos os valores selecionados */
$(values).map(function(k, j) {
total += parseFloat( $(j).data('price').replace(",", ".") );
});
});
$("#preview_value").text(total);
});
});
You were able to resolve the https://answall.com/q/297362/8063 issue that you abandoned?
– Sam