»
EnglishFrenchVietnamese

Print - Sticky Menu Bar - JavaScriptBank.com

Full version: jsB@nk » Menu » Floatable » Sticky Menu Bar
URL: https://www.javascriptbank.com/sticky-menu-bar.html

Sticky Menu Bar © JavaScriptBank.comWhether you scroll up or down, this Menu Bar sticks to you like a mosquito in a hot night. Very impressive.

Full version: jsB@nk » Menu » Floatable » Sticky Menu Bar
URL: https://www.javascriptbank.com/sticky-menu-bar.html



JavaScript
<SCRIPT language=javaScript>function setVariables(){if (navigator.appName == "Netscape") {v=".top=";h=".left=";dS="document.";sD="";y="window.pageYOffset";x="window.pageXOffset";iW="window.innerWidth";iH="window.innerHeight"}else {h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style";y="document.body.scrollTop";x="document.body.scrollLeft";iW="document.body.clientWidth";iH="document.body.clientHeight"}xyz=500object="logo";checkLocationA()}movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0function checkLocation(){innerX=eval(iW)-135innerY=eval(iH)-120if (document.layers){innerY-=10;innerX-=10}yy=eval(y);xx=eval(x);ydiff=ystart-yy;xdiff=xstart-xx;if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=moveyif ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movexeval(dS+object+sD+v+(ystart+innerY));eval(dS+object+sD+h+(xstart+innerX));setTimeout("checkLocation()",10)}function checkLocationA(){ystart=eval(y);xstart=eval(x);}function switchLogo(abc){if (abc=="menu"){                     //to stop the switch logo functioneval(dS+object+sD+v+0);               // justeval(dS+object+sD+h+(-200));           // slash out these linesobject=abc}                              //at theelse xyz=setTimeout("delayLogo()",2000)   // beginning}function delayLogo(){eval(dS+object+sD+v+0);          //eval(dS+object+sD+h+(-200));      //and these three tooobject='logo'                     //}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=setVariables();checkLocation()><DIV id=logo style="LEFT: 0px; POSITION: absolute; TOP: -200px; Z-INDEX: 2"><TABLE border=0 cellPadding=0 cellSpacing=10 width=100>  <TBODY>  <TR>    <TD bgColor=#eeeeee>      <CENTER><A href="javascript:void(0)" onmouseover="switchLogo('menu')"       ;><BR><BR>      <IMG border=0   src="brand.gif" width="99" height="24"></A></CENTER></TD></TR></TBODY></TABLE></DIV><DIV id=menu style="LEFT: 0px; POSITION: absolute; TOP: -200px; Z-INDEX: 2"><TABLE border=0 cellPadding=0 cellSpacing=10 width=100>  <TBODY>  <TR>    <TD bgColor=#eeeeee>      <CENTER><A href="javascript:void(0)" onmouseout="switchLogo('logo')"       onmouseover=clearTimeout(xyz) ;>Menu One</A></CENTER></TD></TR>  <TR>    <TD bgColor=#eeeeee>      <CENTER><A href="javascript:void(0)" onmouseout="switchLogo('logo')"       onmouseover=clearTimeout(xyz) ;>Menu Two</A></CENTER></TD></TR>  <TR>    <TD bgColor=#eeeeee>      <CENTER><A href="javascript:void(0)" onmouseout="switchLogo('logo')"       onmouseover=clearTimeout(xyz) ;>Menu Three</A></CENTER></TD></TR></TBODY></TABLE></DIV></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/menu/brand.gif