Topic: Sidenav .changeMode
Andrew Ford priority asked 4 years ago
Expected behavior
Actual behavior
The sidenav initiated. Then I wanted to build this https://mdbootstrap.com/docs/standard/navigation/sidenav/#subsection-mdb-navigation, I copied and pasted everything, the HTML, the CSS and the JS. The sidenav still loads, in the console I see this error (see below resources).
Resources (screenshots, code snippets etc.)
Uncaught TypeError: Cannot read property 'changeMode' of null
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: 1.0.0
- Device: N/A
- Browser: N/A
- OS: N/A
- Provided sample code: No
- Provided link: Yes
Magdalena Dembna staff commented 4 years ago
I cannot reproduce your issue without additional data - can you run a console.log on a
sidenav
andsidenavInstance
variables? It seems like the second one isnull
. Try resizing the window - does the error still appear or is it just on load? Do you have additional code in your<script>
tags?Andrew Ford priority commented 4 years ago
sidenav
andsidenavInstance
are null in the console.The
resize
event is not firing. I don't have any additional code.Magdalena Dembna staff commented 4 years ago
Can you edit the ticket so it includes your entire code? If it doesn't find the
sidenav
it's probably an issue with the ID. You can also test the code here: https://mdbootstrap.com/snippets/standard/ascensus/2450786#html-tab-viewtjklug11 free commented 3 years ago
Andrew - I am having the same issue. Did you ever find the resolution? Thanks in advance.