title: Why does the jquery change event not trigger when I set the value of a select using val()?
body: <p>The logic in the <code>change()</code> event handler is not being run when the value is set by <code>val()</code>, but it does run when user selects a value with their mouse. Why is this?</p>
  
  <pre><code>&lt;select id="single"&gt;
      &lt;option&gt;Single&lt;/option&gt;
      &lt;option&gt;Single2&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;script&gt;
      $(function() {
          $(":input#single").change(function() {
             /* Logic here does not execute when val() is used */
          });
      });
  
      $("#single").val("Single2");
  &lt;/script&gt;
  </code></pre>