title: jQuery .trigger('click')
body: <p>I am having trouble getting this to work. I would like to trigger the second link. If anyone can help that would be much appreciated.</p>
  
  <pre><code>    $(".links").click(function () {
          alert($(this));
      })
  
  
      function someFunction(){
          $(".links").trigger('click');
      }
  
      someFunction();
  
      ...
      &lt;a href="1.html" class="links"&gt;One&lt;/a&gt;
      &lt;a href="2.html" class="links"&gt;Two&lt;/a&gt;
      &lt;a href="3.html" class="links"&gt;Three&lt;/a&gt;
  </code></pre>