Topic: SideNav dynamic content Bootstrap5

NPT premium asked 2 years ago


I'll like to add content to a SideNav dynamically through Javascript. And use the function data-mdb-slim.
This works fine as long at the SideNav only have 1 level, if I add 2 leves I get an error when toggling between slim and full view.

Actual behavior I can get the function to work when writing SideNav in HTML but it won't work when adding dynamic. Can anybody please provide a simple example using the latest version of MDB?

Resources (screenshots, code snippets etc.) The example that I have used is: https://mdbootstrap.com/docs/standard/navigation/sidenav/ -> Slim Example. This is working with static HTML code.


Mateusz Lazaru staff answered 2 years ago


Hi,

could you provide code sample or recreate this problem in snippet?



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: Premium
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.2.0
  • Device: MDB5
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes