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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to hide sidarbar menu dynamically?

ApexMeisterSep 8 2017 — edited Sep 12 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

}

This post has been answered by Justin Warwick on Sep 11 2017
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 10 2017
Added on Sep 8 2017
7 comments
2,822 views