title: Programmatically trigger jquery dropdown change event as soon as the page loads
body: <p><a href="https://i.stack.imgur.com/o6P95.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o6P95.png" alt="enter image description here"></a></p>
  
  <p>I have 2 dropdownlist that will fire an event if both of them are changed.
  (meaning, any changes on the indices will fire a json request that is based on the dropdownlist's current value and append them to my table).</p>
  
  <p>My question is that,as soon as the page loaded, are there any ways to pre-select their indices and fire the event at the same time? I am planning to set them based on the current term and school year. </p>
  
  <p>Here is my jquery code:</p>
  
  <pre><code>$schoolyear = $('select#schoolyear');
  $schoolterm = $('select#schoolterm')
  $tbl = $('#classview');
  
  $schoolyear.change(function () {
  getCL();
  });
  
  $schoolterm.change(function () {
  getCL();
  });
  
  
  function getCL() {
              $.getJSON('@Url.Action("getClassList","Enrollment")', { term: $schoolterm.val(), year: $schoolyear.val() }, function (e) {
  
                  $tbl.find('tbody').remove();
  
                  if (e.length &gt; 0) {
  
                      $(e).each(function (index, e) {
                          $tbl.append('&lt;tr&gt;&lt;td&gt;' + e.subj + '&lt;/td&gt;&lt;td&gt;' + e.days + '&lt;/td&gt;&lt;td&gt;' + e.cstart + '&lt;/td&gt;&lt;td&gt;' + e.cend + '&lt;/td&gt;&lt;td&gt;' + e.professor + '&lt;/td&gt;&lt;td&gt;' + e.units + '&lt;/td&gt;&lt;td&gt;' + e.status +
                          '&lt;/td&gt;' + '&lt;td&gt;' + '&lt;form action="/Enrollment/dropClass" method="post"&gt;' + '&lt;input type="hidden" name="test"  value="'+e.id+'"/&gt;' +
                          '&lt;a href="#"&gt; Delete &lt;/a&gt;' + '&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;')
  
                      });
                  }
                  else {
                      $tbl.append('&lt;tr&gt;&lt;td colspan="8"&gt;No match found&lt;/td&gt;&lt;/tr&gt;');
                  }
                  //compute t
              });
    }
  </code></pre>