The Slip and Slide Menu
This script is a slipping and sliding link menu. If you need something that is going to wow your users and make your web site nav look great, try this.
AI
Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Codice sorgente
<!--
/*
Copyright © THE GREAT HUMBLE AND EVER SERIOUS SAM MOSES
Version: 8 (N6.01 Compatibility)
*/
// Default settings. They are flexable and can be modified.
YOffset=20; // no quotes!!
staticYOffset=20; // no quotes!!
slideSpeed=20 // no quotes!!
waitTime=0; // no quotes!! this sets the time the nav stays out for after the mouse goes off it.
hdrFontFamily="Verdana";
linkFontFamily="Verdana";
linkFontSize="1";
navIsStatic="yes";
navWidth=110; // Must be a multiple of 10! no quotes!!
barBGColor="#ccccc";
barFontFamily="Verdana";
barVAlign="top";
barWidth=10; // no quotes!!
NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
moving=setTimeout('null',1)
function moveOut() {
if ((NS6 && parseInt(epnav.left)<0)||(IE && epnav.style.pixelLeft<0)||(NS && document.epnav.left<0)) {
clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed)
if (NS6) {epnav.left = parseInt(epnav.left)+10+"px";}
if (IE) {epnav.style.pixelLeft += 10;}
if (NS) {document.epnav.left += 10;}}
else {clearTimeout(moving);moving=setTimeout('null',1)}};
function moveBack() {
clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}
function moveBack1() {
if ((NS6 && parseInt(epnav.left)>(-navWidth))||(IE && epnav.style.pixelLeft>(-navWidth))||(NS && document.epnav.left>(-navWidth))) {
clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);
if (NS6) {epnav.left = parseInt(epnav.left)-10+"px";}
if (IE) {epnav.style.pixelLeft -= 10;}
if (NS) {document.epnav.left -= 10;}}
else {clearTimeout(moving);moving=setTimeout('null',1)}};
lastY = 0;
function makeStatic() {
if (NS6) {winY = window.pageYOffset;}
if (IE) {winY = document.body.scrollTop;var NM=document.all('epnav').style}
if (NS) {winY = window.pageYOffset;var NM=document.epnav}
if (NS6||IE||NS) {
if (winY!=lastY&&winY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - YOffset + staticYOffset);}
else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY);}
else {smooth=0}
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (NS6) epnav.top=parseInt(epnav.top)+smooth+"px"
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;
setTimeout('makeStatic()', 1)}}
function initSlide() {
if (NS6){
epnav=document.getElementById("epnav").style
epnav.visibility="visible";
epnav.left = -navWidth;}
else if (IE) {
epnav.style.visibility = "visible"
epnav.style.pixelLeft = -navWidth;}
else if (NS) {
document.epnav.left = -navWidth;
document.epnav.visibility = "show"}
if (navIsStatic=="yes") makeStatic();}
function startNav(navHeader, barText) {
if (IE||NS6) {document.write('<DIV ID="epnav" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+' ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="epnav" bgcolor="'+navBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(navWidth+barWidth+2)+'" bgcolor="'+navBGColor+'"><TR><TD>')}
tempBar=""
for (i=0;i<barText.length;i++) {
tempBar+=barText.substring(i, i+1)+"<BR>"}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(navWidth+barWidth+2)+'" bgcolor="'+navBGColor+'"><tr><td bgcolor="'+hdrBGColor+'" WIDTH="'+(navWidth-1)+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+navHeader+'</b></font></td><td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')}
function addItem(text, link, target) {
if (!target) {target=linkTarget}
document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+(navWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="epnavItems">'+text+'</DIV></LAYER></ILAYER></TD></TR>')}
function addHdr(text) {
document.write('<tr><td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+(navWidth-1)+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}
function endNav() {
document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial"> </font></td></TR></table>')
if (NS6){document.write('</TD></TR></TABLE>')}
if (IE||NS6) {document.write('</DIV>')}
if (NS) {document.write('</LAYER>')}
if (NS6||IE||NS) setTimeout('initSlide();', 100)}
//-->
<!--
/*
Configure nav styles below
NOTE: To edit the link colors, go to the STYLE tags and edit the epnavItems colors
*/
YOffset=20; // no quotes!!
staticYOffset=20; // no quotes!!
slideSpeed=20 // no quotes!!
waitTime=20; // no quotes!! this sets the time the nav stays out for after the mouse goes
navBGColor="#cccccc";
navIsStatic="yes";
navWidth=100; // Must be a multiple of 10! no quotes!!
hdrFontFamily="verdana";
hdrFontSize="1";
hdrFontColor="BLUE";
hdrBGColor="#ffffff";
hdrAlign="left";
hdrVAlign="center";
hdrHeight="20";
linkFontFamily="Verdana";
linkFontSize="1";
linkBGColor="#E5E5E5";
linkOverBGColor="#CCCCCC";
linkTarget="main";
linkAlign="Left";
barBGColor="#ffffff";
barFontFamily="Verdana";
barFontSize="1";
barFontColor="#000000";
barVAlign="left";
barWidth=10; // no quotes!!
startNav("category", "LINKS")
addItem('sams page1', '3?news', '');
addItem('sam2', '1.asp', '');
addItem('sam3', '2.asp', '');
addItem('sam4', '3.asp', '');
addItem('sam5', '4.asp', '');
addHdr('category2');
addItem('sam6', '5.asp', '');
addItem('sam7', '6.asp', '');
addItem('sam8', '7.asp', '');
addItem('sam9', '8.asp', '');
addItem('sam10', '9.asp', '');
addItem('sam11', '10.asp', 'target=moulder');
addItem('sam12', '11.asp', 'target=skully');
addHdr('category3');
addItem('sam1', '12.asp', '');
addItem('sam2', '13.asp', '');
addItem('sam3', '14.asp', '');
addItem('sam4', '15.asp', '');
addItem('sam5', '17.asp', '');
addItem('sam6', '18.asp', '');
endNav()
//-->
Upload
Upload
Commenti originali (3)
Recuperato da Wayback Machine