Bishu
June 22, 2020, 3:21am
1
Most the Menu Item I keep at the Navbar Item and it show in the horizontal menu.
But for some UserLevel all the menu item are at Navbar and the vertical menu is empty.
so for them I would like to hide or disabled the vertical menu with the menu icon when there is empty item for the vertical menu.
when the browser size is reduce the horizontal menu automatically change to vertical menu at that time it should show the vertical menu.
mobhar
June 22, 2020, 1:16pm
2
Just inspect the element id/class selector of the sidebar, and hide it by using jQuery code in Startup Script section.
Bishu
June 23, 2020, 11:20am
3
mobhar wrote:
Just inspect the element id/class selector of the sidebar, and hide it by
using jQuery code in Startup Script section.
I try with
if ( !$( “.navbar-nav” ).hasClass( “.ew-navbar-item” ) ) {
$(“#ew-navbar ”).hide();
}
but it hide in both the condition when there is menu item and when there is empty.
mobhar
June 24, 2020, 8:50am
4
Did you hide the menu items by using server event or client scripts?
Bishu
June 25, 2020, 6:15am
5
mobhar wrote:
Did you hide the menu items by using server event or client scripts?
I use it in the Client Scripts
mobhar
June 25, 2020, 9:46am
6
Your jQuery code above is not for hiding menu items, but it will the navbar.
What I meant is, when you hide the menu items (not navbar or sidebar), did you use PHP code in server events?
Bishu
June 25, 2020, 12:24pm
7
mobhar wrote:
Your jQuery code above is not for hiding menu items, but it will the navbar.
What I meant is, when you hide the menu items (not navbar or sidebar), did you use
PHP code in server events?
Before I was trying on the client script
$(“#ew-navbar ”).hide();
but unable to solve the issue
I have not use any code in server event