title: Change selected value in dropdown list if session variable exists
body: <p>I've got an html table of attendees with a drop down at the top with three values which filters out VIP, general or show all. This works perfectly, my issue is when a user clicks on a record in the table they going to a modal and after closing the modal the page is refreshed. </p>
  
  <p>I stored a cookie variable and selected the value when the drop down is draw but applying because it's looking for a change evente. How can I change the drop down with javascript after the window has loaded?</p>
  
  <pre><code>&lt;select id="ea_constrain" name="ea_constrain" class="blackM" style="width:100px;height:20px;"&gt;
      &lt;option value="0"&gt;Show All&lt;/option&gt;
      &lt;option value="1" &gt;Attending&lt;/option&gt;
      &lt;option value="2"&gt;VIP&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  
  
  <pre><code>$( document ).ready(function() {
      $("select#ea_constrain option").filter(function() {
          return $(this).val() == &lt;cfoutput&gt;"#cookie.attendeeconstraint#"&lt;/cfoutput&gt;; 
      }).prop('selected', true);
  });     
  </code></pre>
  
  <p>Thank you in advanced!</p>