title: Update select menu by URL hashtag
body: <p>I am trying to update a select menu to match up with each slide in a slideshow. As it is, the slideshow is bookmarkable with a hashtag on the URL updated for each slide. My select menu has a class for each option which matches the hashtags for each slide. I'm using Cycle2 for my slideshow and DDslick for my dropdown. However, my javascript is not working to update the select menu, even with DDslick disabled. </p>
  
  <p>Right now this is my javascript;</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$( ".cycle-pager span, #prev, #next" ).click(function() {
        if ($('.watch').css('opacity') == '1') {
          var link=$(this).attr('data-cycle-hash');
          var hash = link.substring(link.indexOf('#')+1);
          $('#selectOptions2 option').removeAttr('selected');
          $('#selectOptions2 .'+hash).attr('selected',true);
        }
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is a full example setup on JSfiddle: <a href="https://jsfiddle.net/liquilife/du2qztfq/5/" rel="nofollow noreferrer">https://jsfiddle.net/liquilife/du2qztfq/5/</a></p>
  
  <p>I feel like I'm really close, just not sure what is misfiring here. </p>