Forum Moderators: open

Message Too Old, No Replies

Moving DIV. I'm a noob.

         

cephus

6:02 pm on Nov 14, 2005 (gmt 0)

10+ Year Member




<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="content-Type" content="text/html; charset=windows-1250">
<script language="JavaScript" type="text/JavaScript">

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>

cephus

6:03 pm on Nov 14, 2005 (gmt 0)

10+ Year Member



Sorry, I didn't say anything in the original post. I'm looking to "scroll" the DIV to it's new location.