<input type="number" id="n" value="0" step=".5" />
<input type="hidden" id="v" value = "0"/>
<script>
$("#n").bind('keyup mouseup', function () {
var current = $("#n").val();
var prevData = $("#v").val();
if(current > prevData || current < prevData){
$("#v").val(current);
var newv = $("#v").val();
alert(newv);
}
});
</script>
http://jsfiddle.net/patrickrobles53/s10wLjL3/
I've used a hidden input type to be the container of the previous value that will be needed for the comparison on the next change.