luis.ap.uyen
luis.ap.uyen

Reputation: 1364

Input number HTML5: is there an event which triggers on every step?

As far as I know, I can only use the change event for it, but it's only triggered when I stop increasing/decreasing the number input, not on each and every step taken.

Is there any way to do that? On native javascript or jQuery.

Upvotes: 0

Views: 74

Answers (2)

A. Wolff
A. Wolff

Reputation: 74420

Use input event: (because anyway support is better than the one for input type number)

$('input[type=number]').on('input', function(){
    console.log(this.value);
});

-jsFiddle-

Upvotes: 4

L Ja
L Ja

Reputation: 1506

$("#number").on('keyup change', function(e){

});

Will work!

Upvotes: 0

Related Questions