function show(){ var div = document.createElement("div"); div.id = "xxx"; div.innerHTML = "<h3>wowo</h3>" div.style.cssText = "position:fixed;bottom:-1000px;right:0;width:100px;height:100px;border:1px solid #000;background-color:#ccc;"; document.body.appendChild(div); animation(); } function animation(){ var el = document.getElementById("xxx"), h = parseInt(el.clientHeight,10);
el.style.bottom = -h + "px"; setTimeout(function(){ var b = parseInt(el.style.bottom,10); b += 5; el.style.bottom = b + "px"; if(b <= 0){ setTimeout(arguments.callee,50); }else{ el.style.bottom = "0px"; } },50); }