I'm trying to make a page with some pop-out and drop-down menus. I have
found a script that pretty much does what I want, but I can't get it to work for multiple menus on the same page (it is supposed to be capable of this).
If anyone is so inclined, please have a look at the
following code. (posted as a test page on my webspace
(
Read more... )
Comments 2
The problem was in the createStyles() function. This is called every time showMenus() is called, which is once per each menu. Here:
styleBorder=(menuStyle.split(",")[quant-1].toLowerCase() == "flat")?cellBorder:0
is the problem. the split function breaks strings into arrays. The delimiter used is "," so all the variables that are split should look like this:
menuWidth = "0,0"
which of course is mentioned NOWHERE in the comments.
So basically, you should number your new menu arrays consecutively, and these should correspond to the comma separated values in the Format Menu section. Also,don't forget to increment the quantity variable on line 85. This seems to control the submenus disappearing when you roll over another menu section.
example:
sample menu
Reply
Thanks for making it work! You = the Man.
Reply
Leave a comment