I'm using apex 5.1.2 and universal theme.
I used the article below but the sidebar is just minimized but I can still see it
https://parthiban037.wordpress.com/2015/11/02/apex-5-0-universal-theme-side-bar-menu-navigation-default-hide/
As of now I can hide the top (nav bar) using the inline css and js code below
inline CSS
.hide-nav-bar {
height: 0px;
}
JS Code
$('.t-Header-branding').addClass('hide-nav-bar');
I tried both but it does NOT worrk
$('t_TreeNav').addClass('hide-nav-bar');
$('t_TreeNav').hide();
It seems like the issue is during page load the sidebar has NOT been rendered yet so anything I set is overwritten by APEX.
I tried the console and both of these functions seem to be valid.
Please note that I need the side bar hidden dynamically like below, thanks
// Sidebar is displayed by default
// When page load DA I would like to execute the code below
if (condition) {
// hide sidebar
}