title: jQuery trigger click on first child
body: <p>I'm trying to invoke a click on first <code>.loader</code> child when document is ready, but no success:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;a class="loader" data-target="david-boy" title="Danny Boy-Rivera"&gt;
      &lt;span class="img"&gt;&lt;span class="play"&gt;&lt;/span&gt;&lt;img src="img/gallery-image1.jpg" alt="" /&gt;&lt;/span&gt;
      &lt;h2&gt;Danny Boy&lt;/h2&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>//Does not work
  $('a.loader:first-child').bind('click');
  $('a.loader:first-child').trigger('click');
  $('a.loader:first-child').click();
  //Works
  $('a.loader:first-child').css("background", "red");
  </code></pre>
  
  <p>Any ideas why?</p>
  
  <h2>Update</h2>
  
  <p>Handler:</p>
  
  <pre><code>$('.loader').click(function(){
      var name=$(this).data("target");
      callVideo(name);
  });
  </code></pre>
  
  <h2>Update2</h2>
  
  <p>So the problem was that I had declared the <code>:first-child</code> action before the handler. I changed their places and everything ok</p>