title: php, jquery, how to trigger a click?
body: <p>i have a link that needs to be triggered from a success post:</p>
  
  <pre><code>&lt;?php    
  if ($_POST["action"] == "1") {
  ?&gt;
  &lt;script type='text/javascript'&gt; 
  $(window).load(function() {
      $(".likepic").click();
  });
  &lt;/script&gt;
  &lt;?php } ?&gt;
  
  &lt;script type='text/javascript'&gt; 
  $(window).load(function() {
  $(".likepic").click(function(){
      $(".likepic").colorbox({width:"620px", height:"570px", inline:true, href:"#likepic_lightbox"});
  });
  });
  &lt;/script&gt;
  &lt;a href="#" class="likepic"&gt;&lt;/a&gt;
  &lt;div class="blackk" style="display:none;"&gt;
  &lt;div id="likepic_lightbox"&gt;test
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>so if that <code>post</code> action is <code>1</code> then run the jquery script and <code>click</code> on the link for something else to happen :) </p>
  
  <p>this is what i tried but without success.</p>
  
  <p>any ideas?
  Thanks</p>