View Full Version : Nested Side Bar Menu Help.......PLEASE!!!

06-16-2011, 02:51 PM
1) Script Title: Nested Side Bar Menu

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/nested_side_bar_menu/

3) Describe problem:

I have successfully implemented the script and have it working. The problem is that it only works properly on SOME of the pages and on others it stacks the submenus on top of eachother. The site can be found at:


**Click on the "=>" to open the category and get to the submenu**

On that pages it stacks. If you click on the "AEG Guns" category, it will bring you to categories.php and it works properly. I have scanned the code and the page source to see if there is any conflicts somewhere, but I just can't seem to find the problem. ANY help would be GREATLY appreciated.


06-16-2011, 03:48 PM
I made some changes to have a "+" and "-" image display in front of the main categories and now the submenu ULs stack on ALL pages. I think it might be something with that and the menu not being initialized properly or something.

Any help would be appreciated. Thanks.

06-16-2011, 04:09 PM
Made a couple more changes and now it is working the way it was to begin with.

06-16-2011, 04:31 PM
Ok, I got it fixed..............finally................lol

I had to comment out the following lines of the javascript...........

//if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
// ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px"; //dynamically position first level submenus to be width of main menu item
//else{ //else if this is a sub level submenu (ul)
// ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px"; //position menu to the right of menu item that activated it

Then I had to hardcode the "left" attribute in the CSS in the ".sidebarmenu ul" and ".sidebarmenu ul li ul" sections to make it display properly due to the nature of the menus not being displayed at the time of the menu initilization.