Menu Schließen

Ratenrechner

6 Monate <?php for($i = 2; $i <option value=""> Monate

CHF 170.40

CHF 170.40

$(document).ready(function () { function updatePrices() { var amount = parseInt($('#amount').val()); var runtimeInMonths = parseInt($('#runtime').val()); var interestRateMin = 4.9; var interestRateMax = 9.9; var totalCostMin = (amount * runtimeInMonths * interestRateMin) / (100 * 12); var monthlyPriceMin = roundPrice((amount + totalCostMin) / runtimeInMonths); jQuery('#monthlyPriceMin').text('CHF ' + monthlyPriceMin); var totalCostMax = (amount * runtimeInMonths * interestRateMax) / (100 * 12); var monthlyPriceMax = roundPrice((amount + totalCostMax) / runtimeInMonths); jQuery('#monthlyPriceMax').text('CHF ' + monthlyPriceMax); } function roundPrice(originalPrice) { return (0.05 * Math.round(originalPrice / 0.05)).toFixed(2); } jQuery('#amount').bind("propertychange change click keyup input paste", updatePrices); jQuery('#runtime').bind("propertychange change click keyup input paste", updatePrices); var amountSlider = $("#amountSlider").slider({ tooltip: "hide" }) .on('slide', function() { $('#amount').val(amountSlider.getValue()); updatePrices(); }).data('slider'); var runtimeSlider = $("#runtimeSlider").slider({ tooltip: "hide" }) .on('slide', function() { $('#runtime').val(runtimeSlider.getValue()); updatePrices(); }).data('slider'); updatePrices(); });