PDA

View Full Version : Slashdot menu - How to add submenus?



hankhepler
11-02-2006, 04:27 PM
1) Script Title: Slashdot menu - How to add a submenu?

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

3) Describe problem: Love the menu, but wanted to know if anyone has added or thought of adding submenus?
Like:
Top
--Sub1
---Sub1.1
--Sub2
--Sub3
---Sub3.1
----Sub3.1.1
etc...
I am sure it is possible...just do not want to re-invent the wheel. If there are other accordian type menus that do this please let me know.

Thanks,
Hank

Surrealismm
11-09-2006, 10:40 PM
I am also interested in having this ability.

insomniac
02-01-2007, 09:29 PM
has anyone figured this out yet? i got close, with a separate function, but it rolls up the sub menu while leaving all the data visible, once its totally rolled up the data disappears. and with the sub menus collapsed the menu section it is a part of leaves a gap at the bottom... i think i may have been better off nesting them without writing all the extra functions.

insomniac
02-01-2007, 10:20 PM
I managed to get a 4 submenus in my script.. its a pain in the ass, not dynamic (I only needed them in one section of the main menu, so it works fine for me). But there are 2 known side effects, one of which I kinda fixed.

1) [semi-fixed] i had to hardcode in an extra 6 pixels to be taken off once the menu was fully closed or i had a weird whitespace at the bottom of the parent submenu div.

2) once any submenu has been collapsed or expanded the parent menu section will not collapse or expand until the page is refreshed.

If anyone wants to see my code and expand upon and make it work as good as the beginning script I'll be happy to let you have it, you just need to give me the finished product because it would be nice if I didnt need all my extra junk in there if i ever wanted to make it work in another area.

insomniac
02-02-2007, 04:06 PM
i worked on that menu more and after a few hours i was able to make it functional for my standards... this is where it lies now...

there doesnt seem to be the weird whitespace at the bottom of the parent menus now, but i could be wrong, things went wonky for no apparent reason before.

and you can close the parent div whenever now, it doesnt matter if you've touched the submenus at all.

i also got the cookie to remember which submenus were open for the restore function...

but before you get all giggity over this... remember, its not dynamic as far as where you can place the submenus in another menu section, mine is only meant to have submenus in one place, and until i need it otherwise.. i dont plan on modifying code anymore

Ictinus
04-23-2007, 09:38 AM
I've modified the sdmenu (earlier version) to allow multiple nested submenus with wrapping text. I've sent it to DimX, but is it ok to post it as it is here?

Cheers,
Ictinus

The email to DimX bounced.

blastup
05-12-2007, 05:02 AM
can someone show me the codes thanzx

Ictinus
05-12-2007, 05:15 AM
can someone show me the codes thanzx

The followup message has become a new thread in the ' Submit a DHTML or CSS code' section: http://www.dynamicdrive.com/forums/showthread.php?t=20460