title: JQuery: Mover the Focus to the First Link
body: <p>How can I move the focus to the first link on the page when the page is loaded using jquery.</p>
  
  <p>Hele is my code:</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>var url, title;
  $(document).ready(function (){
      $("a").each(function() {
          url = $(this).attr("href");
          title = $(this).attr("title");
          
          for (var i = 0; i &lt; url.length; i++) {
              
          }
      });
  });
  
  $(document).on('click', 'a', function(evt) {
      evt.preventDefault();
      
      url = $(this).attr("href");
      title = $(this).attr("title");
      
      $("#caption").text(title);
      $("img").attr('src', url);
  });</code></pre>
  </div>
  </div>
  </p>