My problem is that I have a table with multiple checkboxes and few buttons. Each checkbox have some value (number). What I'm trying to achieve is to could manipulate values in all checked checkboxes using buttons. When I click on the button than values in all selected checkboxes should increase/decrease (depend from clicked button).
I have so far this:
$("input:checkbox").change(function () {
$("input:checkbox").each(function () {
if ($(this).is(":checked")) {
var count = 0,
newVal = parseInt($(this).val());
$("#increase").click(function () {
for (i = 0; i < 1; i++) {
count += 1;
if (newVal >= 90) {
newVal = 100;
$("#increase").prop('disabled', true);
} else {
newVal += 10;
$("#increase").prop('disabled', false);
}
console.log(newVal)
}
});
}
});
});
I don't know how to update old values with those new (increased).