Have input text with value of 0 and two buttons plus and minus.
the weird stuff is when click the button, the increment is by 2 instead of 1…?
2 – 4 – 6…… what is wrong with the script?
$(function() {
$(".PLUS").click(function(){
var $this = $(this);
var quantity = parseInt($this.siblings(".InputText").val()) +1;
$(this).siblings(".InputText").val(quantity);
});
});
I think the problem is that your script is being called twice.
Try this
If it is not the problem, you can also try to change parseInt() for Number().