title: jQuery - Change value of dropdown when link is clicked
body: <p>I'm trying to change the value of a dropdown when a link is clicked. I've done my due diligence and believe this can be done with 'prop' .. but I'm not sure how I'd use prop with my particular example. The code I was using up to now is...:</p>
  
  <pre><code>var $select = $('#finder-3--16');
  $('a[href="#yearselect"]').click(function () {
      $select.val( $(this).data('select') );
  });
  </code></pre>
  
  <p>On the click of a link, it sets the value but does not change it (therefore events binded to onchange are not triggered). An example of the link can be seen below...:</p>
  
  <pre><code>&lt;a href="#yearselect" data-select="125921"&gt;2009&lt;/a&gt;
  </code></pre>
  
  <p>I believe I have to return the value somehow and then use that, but not sure how to do it. Any help would be greatly appreciated!</p>
  
  <p>The onchange function can be seen here:</p>
  
  <pre><code>onChange: function(event)
  {
      var select     = Event.element(event);
      var parentId   = select.value;
      var dropdownId = 0;
  
      /* should load next element's options only if current is not the last one */
      for (var i = 0; i &lt; this.selects.length; i++){
          if (this.selects[i].id == select.id &amp;&amp; i != this.selects.length-1){
              var selectToReload = this.selects[i + 1];
              if (selectToReload){
                  dropdownId = selectToReload.id.substr(selectToReload.id.search('--') + 2);
              }
              break;
          }
      }
  }
  </code></pre>
  
  <p>Thanks!</p>