Hide/show menu items

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Pedrod
Beginner
Beginner
Posts: 4
Joined: Tue Sep 07, 2004 6:29 pm

Hide/show menu items

Post by Pedrod »

hi, is there any way that i can hide or show specific menu items? so far, i've tried setting the raw CSS of a menu item to "visibility:hidden;" and then when i want to show it i set the rawcss to "". The only problem is, I think by changing the rawcss, I'm changing the style for the menu item's <A> tag, and not it's parent <DIV> - there is still a 1px line that can be clicked.
The code I'm using to "hide" all the menu items is:

Code: Select all

			function mm_hideMenuItems(menuName)
			{
				var Menunum = getMenuByName(menuName);
				var objmenu = _m[Menunum]
				for (i=0;i<objmenu[0].length;i++)
					{
						_mi[objmenu[0][i]][78] = "display:none;visibility:hidden;height:0px;";
						
					}				
			}
Any ideas?
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Pedro,

Is your goal to still show the cell that the item occupied, but just not show the item (kind of like a disabled menu item), or do you want to completely remove the item from the menu?

Kevin
Pedrod
Beginner
Beginner
Posts: 4
Joined: Tue Sep 07, 2004 6:29 pm

Post by Pedrod »

I want remove it.
Post Reply