title: jQuery, how to capture when text input has changed as a result of another event
body: <p>I have a text input that is updated as a result of a button event. I would like to detect when the value in the text input has changed. See the example below:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;script  type="text/javascript"&gt;
  $(document).ready(function(){
     $('#text').bind("input change paste", function(){
        console.log("text changed");
        // do something
     });
  
     $('#click').click (function(){
        $('#text').val('something');
     });
  });
  &lt;/script&gt;
  
  &lt;body&gt;
     &lt;input id='text' type='text'&gt;
     &lt;input id='click' type='button' value='click'&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Later on, that button will trigger a calender so the user select a date/time which will update the text input. Since the calender is part of a library we I don't want to change it. I would like to detect when the text field gets a new value. </p>
  
  <p>thanks!</p>