Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to hide Sidebar menu dynamically?

ApexMeisterSep 11 2017

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

}

pastedImage_0.png

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2017
Added on Sep 11 2017
0 comments
508 views