Selected item sidenav


Topic: Selected item sidenav

thiagokaiser asked 7 years ago

Hello, I'd like to know how I set the item is active on sidenav. When I click on a menu-item, Sidenav appears all closed on the page.

Jakub Strebeyko staff commented 7 years ago

Hi thiagokaiser, Thanks for reaching out. Could you perhaps describe the behavior you expect? For example would you like a sub-menu to be open on page-load or rather not for them not to close when you open another one? With Best Regards, Kuba

thiagokaiser commented 7 years ago

Hi. I'd like the menu stay open after page load. It's seems what item is active.

Jakub Strebeyko staff answered 7 years ago

Hi thiagokaiser, To have a collapsible sideNav menu open on page load try adding .active CSS class to <a> element already holding .collapsible-header CSS class. With Best Regards, Kuba

thiagokaiser commented 7 years ago

Hi, Jakub. It's works just in menu, how about item menu?

Jakub Strebeyko staff commented 7 years ago

Hi thiagokaiser, To have the menu itself open on page load, it's sufficient to apply to initialize it with .click(), like so: // SideNav Initialization $(".button-collapse").sideNav().click(); Best regards, Kuba

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No