title: How to change the selected option of a select box onload?
body: <p>i am working on a project, where i have to select a particular option of a select box, i know how to do this, but the problem is a function must be called whenever value of select box changes, when we do it manually it works, but when i do it with jquery onload, that function not works. Because it only work when a user manually change the option from select box. Please tell me how to do this.</p>
  
  <p>example: </p>
  
  <pre><code>          &lt;select&gt;
                 &lt;option val="0" selected&gt;&lt;/option&gt;
                 &lt;option val="1"&gt;&lt;/option&gt;
                 &lt;option val="2"&gt;&lt;/option&gt;
                 &lt;option val="3"&gt;&lt;/option&gt;
                 &lt;option val="4"&gt;&lt;/option&gt;
                 &lt;option val="5"&gt;&lt;/option&gt;
            &lt;/select&gt;
  </code></pre>
  
  <p>here is some of my efforts which i have tried:</p>
  
  <pre><code>$("select").val('5');
  </code></pre>