Here's what I want to do:
- I have a menu listed on the side bar like this:
- Menu 1
- Menu 2
- Menu 3
- Menu 2 has a child menu like this:
- Menu 1
- Menu 2
- Sub-menu 2.1
- Sub-menu 2.2
- Sub-menu 2.3
- Menu 3
- I want the menu on the home page to be like no [1], but when the user click on Menu 2, it goes to page 2 and the sub-menu is opened automatically like on no [2]. If the parent doesn't have a child menu then it won't opened.
A friend suggested that I should give an 'id" for each page and tell JavaScript to behave a certain way when go to the particular page. I'm going to try to do this next.
If anyone has other suggestions, please let me know.
Thank you in advanced.
This one i suggest you use pure CSS DROPDOWN MENU. Personally speaking, I don't like to use JavaScript for dropdown menu. It often create cross browser problems.
ReplyDeleteI have uploaded a sample to my web host. see if it helps.
http://uts2009dmt.net16.net/cssmenu/cssdropdownmenu.html
Thanks for the suggestion Kaida! I spoke to Alastair last week and he suggested that I use the PHP command to tell the menu to show or not and it works! However, I'll keep the CSS drop-down menu in mind for next time.
ReplyDeleteThanks again
Cheers
Vera