title: link to dynamic anchors
body: <p>I have a json array of instructor data that feeds into a template and generates a "card" for each instructor. Each instructor contains a named anchor and I want to be able to link to the various generated anchors from an external page. i.e. <code>instructors.htm#MrsTaylorGreen</code></p>
  
  <p>It seems that by the time the cards have a chance to generate, all the browser's jump-to-anchor behavior is done.</p>
  
  <p>I'm considering this bit of jQuery derived from <a href="https://stackoverflow.com/questions/6677035/jquery-scroll-to-element">here</a></p>
  
  <pre><code>// page load, draw instructor cards then...
  // scroll to the named anchor if there is one
  var anchor = document.location.href.split("#")[1];
  if($("#" + anchor).length)
      $('html, body').animate({
          scrollTop: $("#" + anchor).offset().top
      }, 2000);
  </code></pre>
  
  <p>Is this necessary? Or is there a more efficient alternative to link to dynamic anchors?</p>