Detect Input changes jQuery

Detect Input changes jQuery

Hi,

What is the best way to detect changes in a input box? I have tried this but it doesn't work.

  1. $(":input").on("DOMSubtreeModified", function() {
  2.       run code
  3. });

Any help will be appreciated. Thanks