Forum Moderators: open
$(document).ready(function(){
$(".checkout").on("keyup", ".quantity", function(){
var price = +$(".price").data("price");
var quantity = +$(this).val();
$("#total").text("$" + price * quantity);
})
})
$(document).ready(function(){
$(".checkout").on("keyup", ".quantity", function(){
var price = +$(".price").data("price");
var quantity = +$(this).val();
$("#total").text("$" + price * quantity);
return total.toLocaleString('de-DE');
})
})
const total = 200
console.log(
total.toLocaleString(
'de-DE',
{ style: 'currency', currency: 'EUR' }
)
Your suggested code puts € in front of number.
<input type="number" class="quantity" value="1" min="1" step="0.1">