Forum Moderators: open
function pausecomp(millis)
{
date = new Date();
var curDate = null;
do { var curDate = new Date(); }
while(curDate-date < millis);
}
function Hide(str) {
x = document.getElementById(str);
x.style.visibility = 'hidden';
}
function Show(str) {
x = document.getElementById(str);
y = x.style.left;
y=y.substring(0,(y.length-2)); //Strip the 'px'
x.style.visibility = 'visible';
for (y=200;y>100;y--)
{
document.all['Layer01'].style.visibility = 'hidden';
document.all[str].style.left=Math.round(y)+5;
pausecomp(10);
document.getElementById('Layer01').style.visibility = 'visible';
}
}
</script>
</head>
<body>
<div id="Layer02" style="position:absolute;top:100px;visibility:visible;">Test<br>test<br>test</div>
<div id="Layer01" style="position:absolute;left:50px;top:50px" onClick="Show('Layer02')" onMouseOut="Hide('Layer02')">Text</div>
</body>
</html>