-1
I have doubts about how to make it work, check several "checkbox" or just one, enter a value in the "Total" input and show the split result, without refresh on the page, I tried with . on change, but I can’t get the checkded quantity and value and show the split value.
Example.
$('input[type=checkbox]').on('change', function() {
var total = $('input[type=checkbox]:checked').length;
$('.resultado').html(total);
});
$('input').on('change', function() {
$('.resultado2').html(this.value);
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input type="checkbox" name="usuario[]" value="1">
<input type="checkbox" name="usuario[]" value="1">
<input type="checkbox" name="usuario[]" value="1">
<input type="checkbox" name="usuario[]" value="1">
<input type="text" value="0">
<div class="resultado2"></div>
<div class="resultado"></div>
You don’t need it to be monetary, just to share...
– Marcello Infoweb
How does someone score negative and not even explain to me why? Ta wanting to harm me, bad faith!!!
– Marcello Infoweb