Reputation: 2275
I have an input in html. I want to be aware on each changing on its content. I know that there is .change function in jquery. But it triggers when you focus on/out the input. I want when user typing in input, for each letter a function will be called. Is there any way to it?
Upvotes: 0
Views: 95
Reputation: 26320
How about use input event
? It's not a cross browser way but it should do the trick.
It triggers when the text has been changed, so you can navigate thrue arrow keys and it won't be triggered.
Or you can store the last input text and compare with the actual on keyup
for a cross browser way.
References: - https://developer.mozilla.org/en/DOM/DOM_event_reference/input
Upvotes: 0