Documentation Error? (.modal is not a function error)
See original GitHub issueI’m attempting to call (in this case the console):
$('#mymodal').modal('open')
This fails, but when I try the following I get expected behaviour:
$('#mymodal').openModal()
The problem (I think) is that the documentation claims the .modal(‘open’) method is the way to do it. http://materializecss.com/modals.html
Does the documentation need updating?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
TypeError: $(...).modal is not a function with bootstrap Modal
This error is actually the result of you not including bootstrap's javascript before calling the modal function. Modal is defined in ...
Read more >Modal not working giving an error modal is not a function #685
I am getting an error in browser debugger " TypeError: $(...).modal is not a function". JS file included are: <script src=".
Read more >Uncaught TypeError: $(...).modal is not a function - YouTube
In this video, you will learn how to solve uncaught type error in jquery.
Read more >Uncaught TypeError: $(...).modal is not a function - jQuery Forum
I put $ in watcher and i did not find any modal function there, what should i do? I am using jquery v3.2.1....
Read more >Possible solution for error - Bootstrap modal: is not a function
Sometimes this warning may also be shown if jQuery is declared more than once in your code. The second jQuery declaration prevents bootstrap.js ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In newer versions openModal was removed
I’m on materialize:materialize@=0.97.6 and still have the same problem. I look for the code and I sow openModal function. Isn’t supposed to have only “modal” function?