Helpful Information
 
 
Category: DD Scripts
Jim's DHTML Menu v5.7

How can I change the color for each main menu item (menu[x])? Is Jim available for contact by e-mail regarding this? I am very impressed with the script and would like to use it on some of my websites, but do not want each menu item to be the same color.

Hey icklem,

A quick sort through the code revealed the answer:

Filename: config.js


function init()
{
//Main Menu items:
menus[0] = new menu(22, "horizontal", 160, 10, -2, -2, "#CACAFF", "#0000A0", "Verdana,Helvetica", 9,
"bold", "bold", "Your colour here", "white", 1, "gray", 2, "rollover:images/tri-down1.gif:images/tri-down2.gif", false, true, true, true, 12, true, 4, 4, "black");
menus[0].addItem("http://www.dynamicdrive.com", "", 100, "center", "Home", 0);

After discussing the problem, this is the solution you are looking for.
Tested under mozilla,ie,opera,netscape.


function init()
{
//Main Menu items:
menus[0] = new menu(22, "horizontal", 160, 10, -2, -2, "#CACAFF", "#0000A0", "Verdana,Helvetica", 9,
"bold", "bold", "Colour for whole level", "white", 1, "gray", 2, "rollover:images/tri-down1.gif:images/tri-down2.gif", false, true, true, true, 12, true, 4, 4, "black");
menus[0].addItem("http://www.dynamicdrive.com", "", 100, "center", "<font color='whatever'>Home</font>", 0);

This customization works for colouring every single menu entry.

Hope this helps,
cr3ative










privacy (GDPR)