Detect all changes to a <input type="text"> (immediately) using JQuery
- by Dustin Boswell
There are many ways the value of a <input type="text"> can change, including:
keypresses
copy/paste
modified with JavaScript
auto-completed by browser or a toolbar
I want my JavaScript function to be called (with the current input value) any time it changes. And I want it to be called right away, not just when the input loses focus.
I'm looking for the cleanest and most robust way to do this across all browsers (using jQuery preferably).
Example use case: On the Twitter Signup page, the username field's value gets shown in the url "http://twitter/username" below it.