Answer the question
In order to leave comments, you need to log in
Materialize.css: how to correctly include individual elements of the library?
It's wrong to connect the entire library, I'm trying to connect the necessary components. I can’t figure out why the desired effect doesn’t work (in particular, the hamburger doesn’t work. The menu doesn’t pop up). I connect the necessary components, but there is some kind of hitch: M is not defined, it gives an error.
Here is the code in which the same object M appears, which is supposedly not defined.
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.sidenav');
var instances = M.Sidenav.init(elems, options);
});
Answer the question
In order to leave comments, you need to log in
import "materialize.css/sass/components/forms/_checkboxes.scss";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question