materialize: TypeError: this.M_Modal is undefined
Hello. I was using materializecss version 0.98.2 without a problem on my project. But with all newer versions (0.99 to 100.1) I’m facing with this error:
TypeError: this.M_Modal is undefined
materialize.min.js:6:67443
This problem appears only on Firefox. Clearing website data solves problem but it reappears again.
Since I widely use materializecss widely on my project, I can’t figure out which code causes this problem. Because this problem appeared with an update, I ask from here instead of Stackoverflow. Sorry if I shouldn’t have.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 33 (18 by maintainers)
Final code : it’s work fine
thank you for your patience and help 😃
html :
js :
The class modal-trigger is required now. https://codepen.io/Dogfalo/pen/qXrdNr
On Mon, Aug 7, 2017 at 10:54 AM, Matt Emborsky notifications@github.com wrote:
– Doggy sends his greetings from Mars.
Did you initialize the modal first? The code has changed. You have to call
.modal(options)
before calling.modal('open/close')
.