In this jsfiddle below you will notice that the incrementing or the decrementing(?) does not work perfectly well - It goes one number off (up or down) - I am looking for a way to make it perfect.
http://jsfiddle.net/Sergelie/8d3th1cb/3/
<div data-role="page">
<div data-role="content">
<input id="button" type="button" value="+" />
<input id="button2" type="button" value="-" />
</div>
</div>
The idea is to go from 0 up to unlimited, and down to stop at 0 (not to -1 the way it does right now).
var count = 1;
$("#button").on('click', function () {
$(this).val(count++).button("refresh");
});
$("#button2").on('click', function () {
if (count>-1)
$("#button").val(count--).button("refresh");
});