title: run onchange and onload in the same function
body: <p>I have this following script:</p>
  
  <pre><code>$(function user_type(){
  
      /* Change select box  values */
      $(document).on("change",".user_type",function(){
          var user_type = $(this).data('user_type');
  
          $.post(base_url+"index.php/manage/load_type",{user_type: user_type},function(data){
  
              var data_obj = JSON.parse(data);
  
   $('#yehida').empty().append('please choose');
   switch (user_type) {
      case 1:
          $.each(data_obj, function (i, item) {
              $('#yehida').append($('&lt;option&gt;', { 
                  value: 0,
                  text : 'no records'
              }));
          });
          break;
      case 2:
          $.each(data_obj, function (i, item) {
              $('#yehida').append($('&lt;option&gt;', { 
                  value: item['id'],
                  text : item['department_name']
              }));
          });
          break;
  
  }
  </code></pre>
  
  <p>This script works only onchange. I want it to run also when the page is loaded.
  What do i need to add\change?</p>