title: How to fire JQuery change event when input value changed programmatically?
body: <p>I want to fire the JQuery <code>change</code> event when the input text is changed programmatically, for example like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("input").change(function(){
      console.log("Input text changed!");
  });
  $("input").val("A");</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type='text' /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But it doesn't work. How can I make this work? </p>