bootstrap-touchspin icon indicating copy to clipboard operation
bootstrap-touchspin copied to clipboard

change event fired multiple times when spinners are used

Open zoinkydoink opened this issue 8 years ago • 0 comments

I have the following

 $('#addAlertDollar').on('change', function () {
        var dollarValue = $('#addAlertDollar').val();
        console.log("addAlertDollar change fired, dollar value is ", dollarValue);

});

$("#addAlertDollar").TouchSpin({
    min: 0,
    max: 1000000,
    step: 1,

    prefix: '$'
});

If the value in the textbox is set to 3.2627 before anything happens, then i hit the spin up change event is called twice, once to display value 3 in console, and another showing 4

I simply would like one event to capture for the entire input if any of the following happens spin up, spin down, user manually changes value.

So I thought best way is to capture change event because I want to also capture if user manually changes the value of the input

zoinkydoink avatar Nov 23 '17 00:11 zoinkydoink