View Full Version : Slashdot Menu collapse / expand issue

Rohit Malik
07-19-2007, 01:11 PM
1) Script Title: Slashdot Menu

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex1/slashdot.htm

3) Describe problem: Check : bottom of the left sidebar at www.delhievents.com, the menus are always expanded. But i want them to be collapsed initially & expand only on click. After that if you click another menu it should open & the previous one should collapse. So, only one expands at a time.

What code do i need to add & where?

Thanks, Rohit

07-19-2007, 01:16 PM
In the file sdmenu.js

Find this code:

function SDMenu(id) {
if (!document.getElementById || !document.getElementsByTagName)
return false;
this.menu = document.getElementById(id);
this.submenus = this.menu.getElementsByTagName("div");
this.remember = true;
this.speed = 4;
this.markCurrent = true;
this.oneSmOnly = true;

Maybe your code is with valor false must change to true

Rohit Malik
07-19-2007, 02:41 PM
Changed it to 'true' but still nothing is happening.

07-19-2007, 02:59 PM
maybe you have activated


I use this menu and works very well:)

I put this code also in the htm code:

<div class="collapsed">

I also prefer this menu collapsed when page loads!

Rohit Malik
07-19-2007, 07:34 PM
Can you send me all the steps you followed with code?

Thanks, Rohit

Rohit Malik
07-19-2007, 07:55 PM
Solved! :-)