title: Click link on load with jQuery
body: <p>Here's a contrived example of my code:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/&gt;    
          &lt;title&gt;&lt;/title&gt;
          &lt;link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/&gt;
          &lt;link rel="stylesheet" type="text/css" href=".css"/&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div&gt;
              &lt;a href="http://www.google.com" class="foo"&gt;YahOO&lt;/a&gt;
          &lt;/div&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
         &lt;script type="text/javascript"&gt;
              $("document").ready(function() {
                  $("#foo").trigger('click');
              });
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I would like to have the link fired immediately upon page load. The above does not work and is incorrect? How could this be done?</p>