Jquery pop-up using fancybox
<p>I've a button clicking on which it shows a pop-up message. Code is given below:</p>

<pre><code>&lt;a id="report_button_id" href="#report_form_container" class="form_show_link" style="text-decoration: none; cursor: hand"&gt;
    &lt;span id="report_button_text_id" class="top_nav_report_button"&gt;My Link Here&lt;/span&gt;
&lt;/a&gt;

&lt;div style="display:none;"&gt;
   &lt;div id="report_form_container" class="popup_container"&gt;
       // Some page is displayed here using div tags
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>In Javascript file:</p>

<pre><code>$("a.form_show_link").fancybox({
    centerOnScroll:true,
    overlayOpacity:0.7,
    overlayColor:'#000000',
    showCloseButton:false,
    hideOnOverlayClick:false,
    onStart:resetPopupFormErrors
});


$("#report_form").keypress(function(e) {
    if(e.which == 13){
        $("#report_form").submit();
    }
});
</code></pre>

<p>Can any one explain how the above code is displaying pop-up windows on clicking button especially when the  style is none????</p>

<p>Thanks!</p>
