Topic: Collapsible not working in sidenav

root-nine priority asked 6 years ago


I have a sidenav with collapsible items. When I click on the collapsible-header the collapsible-body is not expanding - nothing happens, the collapsible-body remains with "display: none" When I switch back to 4.5.6 everything is working fine.

Clendening pro commented 6 years ago

I'm experiencing the same issue after upgrading 4.5.6 -> 4.5.8.

root-nine priority answered 6 years ago


That solved it for me as well. The initialization of the sidenav was after the mdb.js was loaded. Now i load the mdb.js and after that I render the markup the initializes the sidenav within the document-ready event. Thank you

Marta Wierzbicka staff commented 6 years ago

You're welcome.

Logan Marshall priority commented 4 years ago

This solved it for me too. thanks!


Marta Wierzbicka staff answered 6 years ago


Hi, in MDB we place our javascript files in the bottom of the HTML page just before </body> tag and then everything is working fine in our project. We can not be responsible for errors resulting from a different arrangement of links than the one we use in our representative index.html file, which you always receive in the MDB package just after downloading it. Best, Marta

Marta Wierzbicka staff answered 6 years ago


Hi, I don't see that problem in my MDB 4.5.8 package. Are you sure of your code for sidenav is the same as here: https://mdbootstrap.com/javascript/sidenav/? Please provide more information and any demo or whole code of your index.html file where the problem exists. I'll try to help you. Best, Marta

root-nine priority commented 6 years ago

Well I´ll try, it´s not that easy, because it´s a really big ASP.NET MVC project. I try to isolate it and let you know. Thank you so far

Clendening pro commented 6 years ago

With 4.5.8, importing mdb.min.js prior to the collapsible html content will break the functionality. Moving the import below corrects the behaviour. This was not the case with 4.5.6. Is this something that would be corrected in the future?


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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags