Target a colorbox and apply focusout
<p>I have a form initially hidden in my page, I display it in a colorbox by using <code>show()</code>, but when the color box disappears the form remains visible, whereas I'd like it to disappear with the colourbox.</p>

<p>I tried the below code, but it isn't what I want because when I click next to the form inside the colorbox my form still disappears:</p>

<pre><code>$(".link_page_form").click(function(){
    $("#page_form").show();
    $.colorbox({inline:true, href:"#page_form"});
    $(this).focusout(function() {
        $("#page_form").hide(); 
    });

    return false;       
});
</code></pre>

<p>How can I target the colorbox and apply focusout?</p>

<p>PS: my form :</p>

    

<pre><code>&lt;form id="link_page_form" method="post" action="my_url" style="display: none" &gt;
    &lt;select id="page_from_link" name="page_from_id" &gt;
        &lt;OPTION VALUE="" &gt;Associate with:&lt;/OPTION&gt;              
            &lt;?php foreach($pages_created as $k) {  ?&gt;                       
                &lt;OPTION id="&lt;?php echo $k[3] ?&gt;" VALUE="&lt;?php echo $k[0]; ?&gt;" &gt;&lt;?php echo $k[1]; ?&gt;&lt;/OPTION&gt;            
            &lt;?php } ?&gt;  
    &lt;/select&gt;   

    &lt;button type="submit" &gt;OK&lt;/button&gt;
&lt;/form&gt; 
</code></pre>


