I have a form with some quantity field and a plus and minus sign on each side,
Thanks so much for everyone who got involved. All I drew upon and was able to come up with this in the end, that served the site very well (it was just the css that was a pain!)
HTML:
js:
jQuery(function(){
jQuery("#qtyplus").click(function(){
jQuery(":text[name='qty']").val( Number(jQuery(":text[name='qty']").val()) + 1 );
});
jQuery("#qtyminus").click(function(){
if(jQuery('#qty').val()>1)
jQuery(":text[name='qty']").val( Number(jQuery(":text[name='qty']").val()) - 1 );
});
});
CSS:
#qtybox button#qtyplus {
background: url("../images/social_icons/elements.png") no-repeat scroll -268px -223px
transparent;
border: medium none;
cursor: pointer;
display: block;
float: right;
height: 23px;
width: 23px;
}
As you can see, I removed the values of the +'s and -'s - hated how it was rendered!