title: How can I detect when the value in input text is changed by a script?
body: <p>I have an input text that I need detect when the text (value) change.
  The value can be changed in two ways: </p>
  
  <ol>
  <li>Allow to the user write in it.</li>
  <li>The user click a button, runs a jQuery event and fill it with the
  result.</li>
  </ol>
  
  <p>For the item 1 I solved using <code>keyup</code> but for the item 2 I have no idea how can I detect when the text is changed.
  I try <code>change()</code> but does not work.</p>