View Full Version : Scrolling divs
norbapro
03-20-2003, 10:56 PM
how do I make a certain div move down, as the user scrolls down. A good example of this would be the scrolling box at http://www.specialized.com, but I don't need something that scrolls with that high of quality. I'm trying to make my recent creation be able to scroll. It is located at http://www.angelfire.com/mi4/blackcatweb/ .
Thanks a lot,
Brendan
norbapro
03-20-2003, 11:01 PM
the real link for my recent creation is
http://www.angelfire.com/mi4/blackcatweb/menutabtrble.html
Weirdan
03-22-2003, 01:47 PM
function scroll_lmenu() {
var from = document.all.lmenu.style.posTop;
var to = document.body.scrollTop+93;
if(from == to) return;
from = from+((to-from)/5);
document.all.lmenu.style.pixelTop = from;
thandle3 = setTimeout('scroll_lmenu()',delay);
}
function window.onscroll()
{
clearTimeout(thandle3);
scroll_lmenu();
}
......
<div id="lmenu" style="position:absolute">Something...</div>
.....
Something like this, I suppose. It's IE version.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.