question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation Error? (.modal is not a function error)

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Dogfalocommented, Sep 21, 2017

In newer versions openModal was removed

0reactions
calebebrimcommented, Sep 21, 2017

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found