Forum Discussion
Jun 16, 2019
Hiding NavBar (orQuickLaunch) in Modern page.
Hi, I wanted to hide the QuickLaunch Bar when displaying my React WebPart.
I succeed in removing it with this code when in the DidMount or DidUpdate :
let navBar = document.getEleme...
- Jun 18, 2019
You can hide the Quick Lauch (left side navigation) via site settings > navigation elements > uncheck "Enable quick launch"
As for the top bar, you can delete all the links in there, but hiding via CSS/JS is definitely not advisable.
Deleted
Jun 17, 2019I might be wrong, but the ‘gotcha’ may be that the class name changes, which would break your statement.
In my experience, any class with a set of characters suffixed tends to be dynamically assigned.
In my experience, any class with a set of characters suffixed tends to be dynamically assigned.
- Thomas BermanJun 17, 2019Iron ContributorThis.
And to answer your question in short, it is not good practice.- Jun 17, 2019
Thomas Berman Thanks for your reply, It is what I suspected. But how can I find the div spNav div for hiding the quicklaunch more safely?
- Thomas BermanJun 18, 2019Iron Contributor
You can hide the Quick Lauch (left side navigation) via site settings > navigation elements > uncheck "Enable quick launch"
As for the top bar, you can delete all the links in there, but hiding via CSS/JS is definitely not advisable.
- Jun 17, 2019
Deleted Thanks for your reply, It is what I suspected. But how can I find the div spNav div for hiding the quicklaunch more safely?