I have a parent element (Editions) which hides its children from displaying in the menu. Id like all of the other dropdown toggles in my menu to be inactive, serving only as toggling headers for the items below—but in the case of the Editions toggle I need it to be active and appear to be a regular link rather than a nested toggle.
Currently all toggles are active, but not on page load. You must click on something else first for the toggle links to become active. Im not certain of why this is.
Thank you for your response, I relinked some of the js files that were broken and it seems to have made all of the toggles inactive. This would be fine if I can choose to make my Editions link an active, non-toggling link. Is this possible? Thanks again, Ryan
You need an if statement that checks if the page is “editions” (by UID or intended template, whatever fits best) and if so, don’t give your li tag the class dropdown and remove all the unnecessary attributes from the a tag, so that you get a normal link like this:
I’d also remove the url from the href attribute of the parents that are not supposed to be directly accessible. Also, make sure to reroute those pages to the error page or wherever, in case someone tries to access them via their URL.
Thank you for your response. The code you posted looks like its changing the styling of the parent throughout the entire menu—but the children of Editions are now visible and the parent link is still inactive. Is there a way to only target ‘editions’. The new menu is here: http://www.shandakenprojects.org/dev/
The desired effect is that the headers remain consistent (not changing styles or becoming links when their children are selected). Here is the original source of the sidebar code- you can see there is an example of what I’m going for http://www.samrayner.com/bootstrap-side-navbar/#solved
It looks as if the styling from when the navigation is collapsed, as it would be on mobile, are now getting applied when its not collapsed.
I should also say that when I added the code you gave me which caused the editions to work properly, this styling change took place. Prior to that the parent dropdowns looked as they do in the link to sams bootstrap side navbar above.