I have a input type of number and a jQuery .on('change') function that runs every time the value of the input changes.
When using chrome, if you continually click the arrows on the input to increase or decrease the value (leaving the mouse inside the clickable area of the arrow) the function fires for the first few times and then just stops. If you then move the mouse outside of the clickable area of the arrow the JavaScript function then runs.
Anyone know how I can deal with this please? Or if there are any work arounds.
Please see the example below.
$('#number').on('change', function(){
console.log('change');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="number" id="number"/>