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
php menus
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
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
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";
Ruth