PDA

View Full Version : Simple Tree Menu: LI Tags Disappear on Contract All



justinVT99
07-26-2007, 11:14 AM
1) Script Title: Simple Tree Menu

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

3) Describe problem: We're using the menu for FAQs. When we insert an unordered list into the answer section (the expanding part), then click on the FAQ to expand the answer, everything works fine. However, if the user clicks "Contract All" first, then clicks the FAQ to see the answer, the unordered list is now gone. Click "Expand All" and it returns.

Has anyone else run into this problem, and if so, how would I go about fixing it? An example can be seen at:

http://www.njng.com/faqs/customer-center2.asp

Click on the first question, and notice that there's a bulleted list. Click on "Contract All", then click on the first question again. The bullets are gone.

Thanks for any help you can provide!

Veronica
07-26-2007, 02:24 PM
It's hiding them because the script treats anything in the menu with an <li> as something that should be hidden or expanded on click. Notice that if you click on the sentence "If you smell this odor" the bullets re-appear. The easiest way to solve your problem is to not use ul/li for the things to do if you smell this odor; just use paragraphs with a small bullet graphic in front of them, something like that.

justinVT99
07-26-2007, 03:26 PM
Veronica,

Thanks for the quick reply. I had thought about removing all of the bullets, or removing the "Contract All" link, but my client wants that link, and there are many more pages just like this where bullets would have to be removed.

So there's no code fix (JavaScript, CSS or otherwise) to fix this problem that you or anyone else knows about?

Thanks again,
Justin

Veronica
07-26-2007, 03:31 PM
You might be able to do it by giving the lists that should contract a class and adding that class to the css for the tree menu. That might leave the other lists permanently visible, even when you don't want them to be, but it could be worth a try.

justinVT99
07-26-2007, 03:38 PM
Thanks. I tried several visiblity methods in CSS, none of them worked. I'll just have to convert the lists to regular bullets like you suggested. Thanks for the help Veronica!