Hide lightbox form on close; using colorbox.js
<p>Using colorbox.js, I am opening a form in a lightbox when the user clicks on the corresponding link. Right now, when the user visits the page the form is hidden but when the they click on the link the form is viewable in the lightbox. When the close the lightbox out, the form is then visible on the actual page. I would like for the form to be hidden on the page when the user exits the lightbox. Here is my script so far <a href="http://jsfiddle.net/j9ths/" rel="nofollow">http://jsfiddle.net/j9ths/</a> :</p>

<pre><code>jQuery(document).ready(function() {
        $("#myForm").hide();

        $("#link_to_form").click(function() {
            $("#myForm").show();
        });

        $("#link_to_form").colorbox({ width: "50%", inline: true, href: "#myForm" });

        $("#cboxClose").click(function() {
            $("#myForm").hide();
        });
 }); 
</code></pre>

<p>The div id of #cboxClose is the "x" button on the lightbox. </p>
