(Sorry for my english)
I got a popup (like notifications on facebook). I wish it hidding after clicking on rest of the page.
dosent work as is should.
Can you help me?
Code:
<div id="login">
...
</div>
CSS:
#login {
background-color:@windows;
position:absolute;
width:413px;
height:190px;
z-index:110;
left:-189px;
top:43px;
overflow:visible;
line-height:normal;
display:none;
}
To show popup i use jquery fadeIn
JS:
var active="";
function show_window(window) {
hide_active_window();
if(active==window) {
active="";
return;
}
active = window;
$('#'+window).fadeIn(200);
switch(window) {
case 'login':
$('#login_button').addClass("active");
break;
}
}
function hide_active_window() {
if(active=="") return;
$('#'+active).fadeOut(200);
switch(active) {
case 'login':
$('#login_button').removeClass("active");
break;
}
}