How to detect a textbox’s content has changed

Start observing ‘input’ event instead of ‘change’.

jQuery('#some_text_box').on('input', function() {
    // do your stuff
});

…which is nice and clean, but may be extended further to:

jQuery('#some_text_box').on('input propertychange paste', function() {
    // do your stuff
});

Leave a Comment