title: How to launch colorbox automatically without any click?
body: <p>The purpose of my program is to open a colorbox with JQuery clicking on a link.</p>
  
  <p><strong>Here's the code :</strong></p>
  
  <pre><code>&lt;a href="&lt;?= $html-&gt;url(array('controller' =&gt; 'competitions', 'action' =&gt; 'index')) ?&gt;" class="game-popup"&gt;
      &lt;?= $this-&gt;Html-&gt;image('image-link.jpg') ?&gt;
  &lt;/a&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
    $('.game-popup').colorbox({'iframe':true, 'width':'690px', 'height':'670px'});
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><em>This code works perfectly.</em></p>
  
  <p>Now for an other reason I need to open a colorbox automatically with a special condition without any click. I tried with the code below but I can't access to my controller:</p>
  
  <pre><code>&lt;a href="&lt;?= $html-&gt;url(array('controller' =&gt; 'competitions', 'action' =&gt; 'index')) ?&gt;" class="game-popup"&gt;
      &lt;?= $this-&gt;Html-&gt;image('competition-galaxy-s3.jpg') ?&gt;
  &lt;/a&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
    $.colorbox({'iframe':true, 'width':'690px', 'height':'670px'});
    document.location.href="/ArgusDuMobile/competitions/index";
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The line of code with <code>$.colorbox</code> seems to be good because when I refresh the page the colorbox is being opened but without its content. To do the link with the controller I tried the following line of code with <code>document</code> but it open the correct content of the view in an other page but not into the colorbox.</p>
  
  <p>Does anyone could help me? Thanks in advance for your answer.</p>