title: How to fire select onchange event with jQuery?
body: <p>I have a dropdown list:</p>
  
  <pre><code>&lt;select size="1" name="filter"id="priority_filter" onchange="filter_user_trainings();"&gt;
     &lt;option value="all"&gt;All&lt;/option&gt;
     &lt;option value="optional"&gt;Optional&lt;/option&gt;
     &lt;option value="mandatory"&gt;Mandatory&lt;/option&gt;
     &lt;option value="essential"&gt;Essential&lt;/option&gt;
     &lt;option value="custom"&gt;Custom&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>In a <code>function</code> I call these:</p>
  
  <pre><code>if(db==0 || db==1 ||db==2)
  {
     $("#priority_filter").val('custom');
  }
  </code></pre>
  
  <p>I want to fire the <code>select</code> <code>onchange</code> function when the jQuery switches the value. How can I do this? The code above does not work.</p>