DostAjans adlı üyeden alıntı

Js:


//CLOSING POPUP
//Click the x event!
$("#popupClose").click(function(){
disablePopup();
});
//Click out event!
$("#backgroundPopup").click(function(){
disablePopup();
});
//Press Escape event!
$(document).keypress(function(e){
if(e.keyCode==27 && popupStatus==1){
disablePopup();
}
});

});


Css:


#popup{
display:block;
position:relative;
width:540px;
background-color: rgb(16, 16, 16);
background-color: rgba(16, 16, 16, 0.8);
z-index:2000;
padding:3px 16px 3px 2px;
margin-top:155px;
margin-left:0px;
overflow:hidden;
}
#popup:hover{
background-color: rgb(231, 55, 33);
background-color: rgba(231, 55, 33, 0.8);
}
#popupClose{
font-size:14px;
line-height:14px;
right:8px;
top:4px;
position:absolute;
color:#fff;
display:block;
cursor:pointer;
}


HTML:





Demo


Sizinkisi tam istediğim gibiymiş ama Sinan Abinin http://wmaraci.com/forum/javascript-jquery-ajax/jquery-slidetoggle-ozelligi-15650.html bu yazısından işimi halletdim. :)