- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2020
11:07 PM
10-06-2020
11:07 PM
Uncaught Error: cannot call methods on modal prior to initialization error
I am integrating a popup but getting below error:
jquery.js:259 Uncaught Error: cannot call methods on modal prior to initialization; attempted to call method 'openModal'
Labels:
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2020
11:10 PM
10-06-2020
11:10 PM
Re: Uncaught Error: cannot call methods on modal prior to initialization error
If you are using the below code then try to replace it with the given code.
$("#modelDivId").modal("openModal");
Replace with
$('#modelDivId').modal(options).modal('openModal');
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020
03:48 AM
10-07-2020
03:48 AM
Re: Uncaught Error: cannot call methods on modal prior to initialization error
Thank you even i had the same problem and replacing the given code has worked for me
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021
09:39 AM
10-11-2021
09:39 AM
Re: Uncaught Error: cannot call methods on modal prior to initialization error
jQuery(".modal .close ").trigger("click");
Another solution: this is worked for me.