I can not change the value of the id="value" input when you click .minus or .plus , what should I do to solve?
<input type="button" value="+" class="plus">
<input id="value" step="1" max="99" min="1" title="Qty" class="qty" type="number" name="prod[<?php echo $result['id']?>]" value="<?php echo $result['quantity']?>" size="4" />
<input type="button" value="-" class="minus">
jquery
$('.plus').click(function() { changeValue(1); });
$('.minus').click(function() { changeValue(-1); });
function changeValue(val) {
var container = $('#value');
var current = parseInt(container.html(), 10);
container.html(Math.max(0, current + val).toString());
}