I have a small jQuery menu setup on my site. When you click on a parent link it provides a smooth scrolling effect to display the sub pages.
I’m trying to find out how to keep the menu open whenever you’re viewing a subpage? Right now if you click Parent -> Subpage the new page will load with the whole menu closed. I want to keep the parent submenu open for all its child pages(I’m using WordPress if that matters). Would appreciate any help! Happy to clarify myself if need be.
I’ve had this problem a while ago, but I didn’t use jquery. I think you can use this on you’re site. The idea is simple: show a div if you’re on a subpage.
Basically this script checks if you are on a page or on a sub-page. If you are on a sub-page it will show the div with id=”show”(the list of all subpages who have the same parent as the supage you’re currently on).