I have a form with some quantity field and a plus and minus sign on each side,
I'm a rookie, but I did it like this for integers...
min and max attributes are optional. Then, inside jQuery(document).ready(...
$(".quantityMinus").live("click", function() {
var qInput = $(this).parents(".quantityInput");
var qText = qInput.find(".quantityText");
var qValue = parseInt((qText.val())? qText.val() : 0);
qText.val(Math.max(qValue - 1, (qInput.attr("min"))? qInput.attr("min") : -0xffff));
});
$(".quantityPlus").live("click", function() {
var qInput = $(this).parents(".quantityInput");
var qText = qInput.find(".quantityText");
var qValue = parseInt((qText.val())? qText.val() : 0);
qText.val(Math.min(qValue + 1, (qInput.attr("max"))? qInput.attr("max") : 0xffff));
});