closing pop up window with javascript?
<p>i wonder if someone could help me. I've basically got a jquery pop up window to view images in. at the moment the only way to close the pop up window is to click on the outside of the pop up or on the so called body of the page.</p>

<p>I've added in a close button within a div that i open up with the pop up window and i want to use javascript to tell it when clicked to close the pop up window.</p>

<p>So here's what i got which works fine, it closes the pop up window, however if a user wants to click on another photo again after they've closed the pop up window then it won't open the pop up window?</p>

<p>Any ideas how i can adjust my javascript to time out once clicked or something like that?</p>

<p>Thanks.</p>

<pre><code>&lt;script&gt; 
 $(function(){ 
  $('.close-button-window').click(function(){   
  $('.photo-window').fadeOut(); //hide the button 
    $('.close-button-window').fadeOut(); //hide the button 


}); 
}); 


        &lt;/script&gt;
</code></pre>
