Hello all, I've been struggling with implementing Jquery into my navigation menu. The menu itself is an unordered list with subitems. The subitems appear next to the main menuitems (for showing, hiding and append classes to these items I use the 'collapsor'-plugin). So far so good...
What is bugging me is the height of the menu, which is static. I want the div #menu to ‘grow’ along when one of the menu-items gets clicked and the subitems pop-out. This is how I want it to look like (uses a predefined height): http://www.opee.nl/jquery/index.html http://www.opee.nl/jquery/init.js I want to calculate the height ul to use as the height of the div #menu. Since I couldn’t grab the .height() of a hidden element, I tried to count the children of the next element within the navigation by multiplying the height of the li (which is 24px) with the number of children + 8px for the padding-top. Maybe it’s more clear when you just look at the source. This is what I have so far (yup, I miserably failed :) ): http://www.opee.nl/jquery/index1.html http://www.opee.nl/jquery/init1.js I hope you can help me tackle this problem. Any help is appreciated! Greetings, Andre