Page 1 of 1

Hide menu by default

Posted: 17 Oct 2017, 15:05
by VN001
Hi!

I want the Omega menu to be hidden by default. Right now it always shows, and I have to hide it by simulating a click on the menu button.

Is there any way to hide it by default?

Thank you very much.


Best regards,

Re: Hide menu by default

Posted: 18 Oct 2017, 12:21
by mert.sincan
Please add "sidebar-inactive-l" class to div.wrapper;

in template.xhtml

Code: Select all

<h:body ...>
   <div class="wrapper sidebar-inactive-l">
   ...
  
</h:body>

Re: Hide menu by default

Posted: 19 Oct 2017, 15:13
by VN001
Hello, thanks for answering!

The behaviour still being the same as when I simulate a click. I see the menu fade out faster.

Is there any way to solve this issue when you load the page?

Thanks in advance.


Best regards,

Re: Hide menu by default

Posted: 23 Oct 2017, 14:00
by mert.sincan
I don't understand this issue. Which situation do you want to open Menu? Could you please attach a sample code? If you don't want to use menu, you can remove it in template.xhtml.

When the page is loaded, if you want to hide menu, please use "sidebar-inactive-l" class;

Code: Select all

<div class="wrapper sidebar-inactive-l">
OR

Code: Select all

$(window).load(function() {
   var wrapper = $('.wrapper');
   if(wrapper) {
      wrapper.addClass('sidebar-inactive-l');
   }
});

Re: Hide menu by default

Posted: 24 Oct 2017, 17:33
by VN001
Hi again,

Let me try to explain the situation we have and the situation we would like to have,

What we have is:

The side menu is always opened and we have included "sidebar-inactive-l" so the behaviour, as you said is the following: the app shows the menu, but the side menu collapse fast.

What we would like to have is:

The side menu is closed, when we navigate to a different view in the application, ideally we would like to keep the side menu closed. Appear and fast close is not an option for our users.

Is that possible?

Thanks you.