I'm trying to add percentage, but it's not showing up correctly.
The intention is to calculate the percentage, and then add up to the value. Example:
100.00 + 10% = 110.00
$(document).ready(function() {
$("#proposta").focusout(function() {
taxa = "10.00"; //%
v1 = $(this).val().replace(",", "");
v2 = (v1 * taxa) / 100;
soma = (v2 + v1);
$("#valorProposta").val(parseFloat(soma));
});
$(".moeda").maskMoney();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="https://plentz.github.io/jquery-maskmoney/javascripts/jquery.maskMoney.min.js"></script>
<input id="proposta" type="text" class="form-control col-md-12 moeda" placeholder="Digite o valor">
<input id="valorProposta" type="text" class="form-control col-md-12 moeda" readonly>