Topic: Sidenav .changeMode
Andrew Ford
pro priority asked 7 months 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.
Closed
- User: Pro
- Premium support: No
- Technology: MDB 5
- MDB Version: 1.0.0
- Device: N/A
- Browser: N/A
- OS: N/A
- Provided sample code: No
- Provided link: Yes
Magdalena Dembna staff premium commented 7 months ago
I cannot reproduce your issue without additional data - can you run a console.log on a
sidenavandsidenavInstancevariables? 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 pro priority commented 7 months ago
sidenavandsidenavInstanceare null in the console.The
resizeevent is not firing. I don't have any additional code.Magdalena Dembna staff premium commented 7 months ago
Can you edit the ticket so it includes your entire code? If it doesn't find the
sidenavit's probably an issue with the ID. You can also test the code here: https://mdbootstrap.com/snippets/standard/ascensus/2450786#html-tab-view