On 5 Mar, 00:19, "RobG" <r...@iinet.net.auwrote:
On Mar 5, 7:59 am, "zachille" <fad...@gmail.comwrote:
I have created a vertical menu:www.fadilo.altervista.org
I would like the menu to
always be visable in the top left of the screen (where it isn't
placed), only when
the user scrolls down the page.
I would like this:http://www.milonic.com/mfa/2005-Octo...c-menu-do-this....
suggestions (or script)?
Use their code.
--
Rob
I would want to use this code:
function moveFollower(){
var doc=(document.compatMode=="CSS1Compat")?
document.documentElement:document.body;
if (!doc || !document.getElementById)
return;
var divMenu=document.getElementById("follower"),
yMenuFrom = parseInt (divMenu.style.top, 10)||0,
yMenuTo = doc.scrollTop,
wheight = doc.clientHeight,
timeoutNextCheck = 500;
if ( yMenuFrom != yMenuTo && wheight >= divMenu.offsetHeight )
{
yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 30 );
if ( yMenuTo < yMenuFrom )
yOffset = -yOffset;
timeoutNextCheck = 5;
divMenu.style.top = yMenuFrom + yOffset;
}
setTimeout (moveFollower, timeoutNextCheck);
}
window.onload=function(){
moveFollower();
}