Код: Выделить всё
function currentPrice() {
var priceProduct = parseFloat($.trim($('span.price').html().replace(",", "").replace("$", "")));
var convertion = ((priceProduct)/100).toFixed(2);
var price = parseFloat($("input#quantity").val());
var total = ((convertion) * (price)).toFixed(2);
$("input.final-price").val(total);
}
// Onload
$(document).on("load", "input", currentPrice);Подробнее здесь: https://stackoverflow.com/questions/442 ... -page-load