php menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

php menus

Post by david1721 »

Hi

I've generated a large php page of menus which takes a few seconds
to load when it's called. I was wondering if a javascript version would
be faster?

If I want to define more than one menu syle in a menu_data.js page
do I just declare with(menuStyle=new mm_style()){
and call "menuStyle" something else?



Thanks

David
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi David,

Yes, that's correct. You can either copy and paste the menuStyle and then rename it and change the parameters to what you want, or if you are using most everything in the style and only have a few things to change you can use the copyOf shortcut.

So, let's say you are going to use everything in the menuStyle but you want to have different off and on bgcolor and different off and on colors, you could use this method

Code: Select all

subStyle=new copyOf(menuStyle); 
subStyle.offbgcolor="#ff00ff"; 
subStyle.offcolor="#ffffff"; 
subStyle.onbgcolor="#ffffff";
subStyle.oncolor="#ff00ff";
This would then use these off and on colors for the submenus but would use everything else, padding, fonts, font sizes etc. from the menuStyle.

Ruth
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

thanks
Post Reply