PDA

View Full Version : Slashdot Menu Problem in Expanding/Collapsing



AlohaMora
06-12-2007, 01:19 PM
1) Script Title: Slashdot Menu

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

3) Describe problem: I have a probleb. I have created a menu on my website which is long (15 Items),

My Problem is with the Show/Hide of the Menus, if someone open my website first time on his/her computer (or my cookiers are reset) then all the menus are Expanded with these values of variables disabled

// Additional methods...

//var firstSubmenu = myMenu.submenus[0];
//myMenu.expandMenu(firstSubmenu); // Expand a submenu
//myMenu.collapseMenu(firstSubmenu); // Collapse a menu
//myMenu.toggleMenu(firstSubmenu); // Expand if collapsed and collapse if expanded
//myMenu.expandAll(); // Expand all submenus
//myMenu.collapseAll(); // Collapse all submenus
myMenu.init();

and if i enable the values then it DO NOT remeber or use the last open menu's values from navigation. What i want is on first time it should use

myMenu.collapsAll();
and after that it never used it till the cookies exists or something like that so that it uses the values of open menus from cookies.

Anybody Plz Help
Aloha

DimX
06-12-2007, 03:27 PM
What i want is on first time it should use
myMenu.collapsAll();
and after that it never used it till the cookies exists or something like that so that it uses the values of open menus from cookies.
Nope, you can't do it that way, but you can set every div's class attribute to "collapsed", it will work then (set remember to true and don't call collapseAll()).

AlohaMora
06-13-2007, 07:15 AM
Thanks for ur help. I tried it that way and it worked.

Thanks alot

Aloha