title: How to close colorbox with a button
body: <p>I use colorbox iframe: </p>
  
  <pre><code>$(document).ready(function(){
      $(".iframe").colorbox({iframe:true, width:"85%", height:"65%", fastIframe:false});      
  });
  </code></pre>
  
  <p>On my second page I have a button, where I want to post some image and after the action I want to  close the frame window.</p>
  
  <pre><code>&lt;input type="button" id="selected" value="the_button" /&gt;
  </code></pre>
  
  <p>and the script</p>
  
  <pre><code>$( document ).ready(function() {
  
      $("#selected").bind('click',function() {
  
          window.setTimeout(function() 
          {
              $.colorbox.close(); 
          }, 2500);
  
          alert('hi');
  
      });
  
  });
  </code></pre>