Topic: Sidenav collapsible open by default

RalfGlaser free asked 5 years ago


Expected behavior I have a MDB sidebar with a collapsible and I want one of those collapsibles to be open by default. How would I achieve this?

Actual behavior I tried several common BS methods (e.g. aria-expanded="true") but I couldn't get it working. Any suggestion is highly appreciated. Thank you.


MDBootstrap staff answered 5 years ago


Hi, To make any of collapsibles open by default you can add some simple jQ code. I prepared our snippet as an example for You.

https://mdbootstrap.com/snippets/jquery/pjoter-2-0/747874

I commented jQ code to make everything clear but if you have any further questions I'm here for you. Best regards, Piotr


RalfGlaser free answered 5 years ago


Works like a charm! Thank you very much!



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.0
  • Device: PC
  • Browser: Chrome
  • OS: Mac OS X
  • Provided sample code: No
  • Provided link: No