Event binding for keyboard input or change through javascript
<p>I have an input field with id <code>myinput</code> , and have <code>change</code> event bind to this field through,</p>

<pre><code>$("input#myinput").change(function(){ 
  alert("the value is changed");
}
</code></pre>

<p>But the handler is not getting called, if I change the value through javascript</p>

<pre><code>$("input#myinput").val(text); 
</code></pre>

<p>But, it works if I enter the input through keyboard.</p>

<p>so, it seems like I am binding to wrong event. What should I do to bind to both keyboard input and JS value update (jQuery <code>val()</code> here).</p>

<p>thanks.</p>
