Ok, done...
replace the code by this
it put's ESC key down working to hide overlay and autoload..
Code:
<script type="text/javascript">
$(function () {
$('#activator').click(function(){
$('#overlay').fadeIn('fast',function(){
$('#box').animate({'top':'160px'},500);
});
});
$('#boxclose').click(function(){
$('#box').animate({'top':'-200px'},500,function(){
$('#overlay').fadeOut('fast');
});
});
});
$(document).keyup(function(e){
if(e.which == '27'){
//om when the ESC(27) key is pressed then will also close.
$('#box').animate({'top':'-200px'},500,function(){
$('#overlay').fadeOut('fast');
});
}
});
$(document).ready(function() {
$('#overlay').fadeIn('fast',function(){
$('#box').animate({'top':'160px'},500);
});
});
</script>
Bookmarks