DHTML scripts

DHTML scripts slide-in menu script
 

DHTML script
categories

Animation
Background
Bookmarks
Buttons
Calculators
Cookies
Data handling
E-mail
Enhancements
Forms
Image rotation
Menus
Messages
Miscellaneous
Music
Password protection
Redirection
Scrollers
Tables
Time & date
Windows

Publishers

Add script
Account login

 

Home > Scripts > DHTML scripts & JavaScripts > Menus > Slide-in menu script

 

Slide-in menu script

AUTHOR: MaXimuS
TYPE: Freeware
BROWSERS:
IE 4+, IE 5+, IE 6+, NS 4+, NS 6+

A lovely slide-in menu script. You can display headers inside the menu and it has the option to statically position it on the page. This updated script does not use the onload event handler which means that once the menu is loaded, it shows up and doesn't wait to load.


EXAMPLE

Position your cursor on "MENU" on the left to make the menu slide-in.


1)
Insert this code in the <HEAD> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

2) Download this ZIP file with the ssmItems.js and ssm.js and unzip into the appropriate directory.

3) In the <STYLE> section define the font color of the links in the menu:

<STYLE><!--
A.ssmItems:link {color:black;text-decoration:none;}
A.ssmItems:hover {color:black;text-decoration:none;}
A.ssmItems:active {color:black;text-decoration:none;}
A.ssmItems:visited {color:black;text-decoration:none;}
//-->
</STYLE>

4) Change the variables for the menu in this section of the ssmItems.js file:

// Positioning and speed
YOffset=80; // set how far from the top the menu should be
staticYOffset=20;
// set the position of menu from the top for the static menu
slideSpeed=20
// set the speed for the moving out and moving back of the menu
waitTime=200;
// this sets the time the menu stays out for after the mouse goes off it.

// For the menu table
menuBGColor="black";
menuIsStatic="yes";
// set to no if you want the menu statically positioned on the page
menuWidth=140;
// must be a multiple of 10!

// For the menu headers and horizontal bars
hdrFontFamily="arial, sans serif";
hdrFontSize="2";
hdrFontColor="#FFFFFF";
hdrBGColor="gray";
hdrAlign="left";
hdrVAlign="center";
hdrHeight="20";

// For the links
linkFontFamily="Verdana";
linkFontSize="1";
linkBGColor="#FFFFF0";
linkOverBGColor="#D7EBFF";
linkTarget="_top";
linkAlign="Left";

// For the vertical menu bar
barBGColor="#FF4400";
barFontFamily="arial, sans serif";
barFontSize="2";
barFontColor="#FFFFFF";
barVAlign="center";
barWidth=15;
// no quotes!!

// Define the links in the menu:
startMenu("Menu", "M E N U")
addItem("Home page", "http://simplythebest.net", "");
addItem("Shareware directory", "http://simplythebest.net/software/", "");
addItem("Information library", "http://info.simplythebest.net", "");
addHdr("DHTML Scripts");
addItem("Animation", "dhtml_animation.html", "");
addItem("Buttons", "dhtml_buttons.html", "");
addItem("Menu scripts", "dhtml_menu_scripts.html", "");

Also don't forget to define the path to the two script files in the <HEAD> section:

<SCRIPT SRC="menu_files/ssm.js" language="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="menu_files/ssmItems.js" language="JavaScript1.2"></SCRIPT>


Have fun putting this script to work on your site. If you would like more information, you can visit the author's web site.


[BACK] [TOP]

 

MY SIMPLYTHEBEST - BLOGS - BOOKMARKS - GAMES - FONTS - HEADLINES
MUSIC - PIXELS - SCRIPTS - SOFTWARE - SOUNDS - WEB SEARCH

 


Copyright © 1997-2008 SimplytheBest Inc. Legal Disclaimer.
All copyrights acknowledged. All rights reserved.