Code:
<html>
<head>
<style type="text/css">
#apDiv1 {
position:fixed;
right:0px;
bottom:-300px;
width:242px;
height:196px;
z-index:1;
background:#09F;
color:#FFF;
border:#000 2px solid;
}
</style>
</head>
<body>
<div style="height:2000px;" ></div>
<div id="apDiv1">this is an apDiv :)</div>
<script type="text/javascript">
/*<![CDATA[*/
function SlideUp(id,ms){
obj=document.getElementById(id);
animate('bottom',obj,-obj.offsetHeight,0,new Date(),ms);
}
function animate(mde,obj,f,t,srt,mS){
var ms=new Date().getTime()-srt,now=(t-f)/mS*ms+f;
if (isFinite(now)){
obj.style[mde]=now+'px';
}
if (ms<mS){
setTimeout(function(){ animate(mde,obj,f,t,srt,mS); },10);
}
else {
obj.style[mde]=t+'px';
}
}
setTimeout(function(){
SlideUp('apDiv1',1000);
},2000);
/*]]>*/
</script></body>
</html>
Bookmarks