title: Setting Focus to a link using class name with Jquery
body: <p>Using jQuery I am trying to set focus for (CSS purposes) to a particular link from a list of related links on the load of the page based upon the class name.</p>
  
  <p>Example, of the following I want to set focus to Link1</p>
  
  <pre><code>&lt;a href="#Link1" class="nav-button-left"&gt;Link1&lt;/a&gt;
  &lt;a href="#Link2" class="nav-button"&gt;Link2&lt;/a&gt;
  &lt;a href="#Link3" class="nav-button"&gt;Link3&lt;/a&gt;
  &lt;a href="#Link4" class="nav-button"&gt;Link4&lt;/a&gt;
  &lt;a href="#Link5" class="nav-button"&gt;Link5&lt;/a&gt;
  &lt;a href="#Link6" class="nav-button-right"&gt;Link6&lt;/a&gt;
  </code></pre>
  
  <p>Currently this is the code snippet I have working so far, and by working I mean I've set it up, it does nothing noticeable so far.</p>
  
  <pre><code>&lt;script type="text/JavaScript"&gt;
      $(window).load(function(){
          if($(this).attr("class") == 'nav-button-left'){$(".nav-button-left").focus();}  
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm fairly sure its the actual focus portion that's not working, although I can't fathom.</p>