I want to have a client side Plus / Minus system where a user can click the plus and a value is incremented by 1, minus and the value is decreased by 1, the value should nev
this is easy and dynamic way to incrment and decrement value
this is the html part
this is the jquery part.
function increment(obj)
{
var count = parseInt($(obj).parent().parent().find('input').val());
$(obj).parent().parent().find('input').val(count+1);
}
function decrement(obj)
{
var count = parseInt($(obj).parent().parent().find('input').val());
if(count != 0)
{
$(obj).parent().parent().find('input').val(count - 1);
}
}