+ 1

Strange Jquery error

In materialize.css I keep getting an error. I followed the documentation but it still won't work. It comes up with an error in the library itself, not my code. You can trigger the error by clicking on the hamburger menu. https://code.sololearn.com/W5fGVK3IWHI6/?ref=app

17th Jul 2020, 6:57 AM
Clueless Coder
Clueless Coder - avatar
5 ответов
17th Jul 2020, 8:41 AM
Calviղ
Calviղ - avatar
+ 2
Calviղ Sorry, I didn't know you had to set it as an ID as well.
17th Jul 2020, 8:42 AM
Clueless Coder
Clueless Coder - avatar
+ 1
For the burger menu, need to add attribute data-target="mobile-demo" Eg. <a class="sidenav-trigger material-icons" data-target="mobile-demo" href="#" style="font-size:35px; margin-top:7px;">menu</a>
17th Jul 2020, 7:52 AM
Calviղ
Calviղ - avatar
+ 1
Calviղ I copied your code exactly to replace the <a>. It still gives an error unfortunately.
17th Jul 2020, 8:23 AM
Clueless Coder
Clueless Coder - avatar
+ 1
Clueless Coder yes, id must be same, to refer to the sidebar component
17th Jul 2020, 8:44 AM
Calviղ
Calviղ - avatar