divhider.js HELP..!

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Lastie
Beginner
Beginner
Posts: 2
Joined: Mon Mar 01, 2004 1:28 pm
Location: Nottingham, UK

divhider.js HELP..!

Post by Lastie »

Hi all,

I’ve downloaded a copy of the divhider.js file but have no idea how to implement this to hide my dropdown menus when the Milonic menu opens.

I’m guessing I have to change the value of ‘M_hideMenus’ and then change something is my menu_data.js file…?

Any help with this would be great.

Thanks,

Steve
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

Yep, you have to define which menus you want the divhider.js to be applied to and to what div...

so lets say you named the div you want to hide "mydiv" and you wanted it hidden when menus named "Staff" and "Products" were shown.

the M_hideMenus would be arranged as follows:

Code: Select all

M_hideMenus = "Staff->mydiv;Products->mydiv;"
You won't see the hide div work unless you are viewing it in one of the affected browsers. I wanted all browsers to hide my div so with Kevin's instruction, I commented out the following line in the code:

Code: Select all

//if(ie55||ns6||ns7)return
Of course you also need to call the hidediv script in your page.

Hope this helps.
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

you also need to define the div in you document. i.e.

<div id=div1 name=div1>Stuff to hide</div>

It is reccomended to also include "style=position:relative" as this will allow Netscape 4x to view the page but I don't do it. If you do it, what you will find is that Netscape 6 keeps the div content absolutly positioned if you resize the browser window.
In my implementation, I have Netscape 4x ignor ehte milonic menu altogether. Your choice - mess up netscape 4x or mess up netscape 6x...
Lastie
Beginner
Beginner
Posts: 2
Joined: Mon Mar 01, 2004 1:28 pm
Location: Nottingham, UK

Post by Lastie »

Thanks guys... All sorted...

:D

Steve
Post Reply