I have a form with some quantity field and a plus and minus sign on each side,
I think this should do it:
$('#add').click(function (e) {
var quant = $(this).next('input');
quant.val(parseInt(quant.val(), 10) + 1);
};
$('#minus').click(function (e) {
var quant = $(this).prev('input');
quant.val(parseInt(quant.val(), 10) - 1);
if (parseInt(quant.val(), 10) < 0)
{ quant.val(0); }
};
This does however depend on the relative positioning of the controls not changing.