Daemonite / material

Material Design for Bootstrap 4
http://daemonite.github.io/material/
MIT License
3.2k stars 725 forks source link

Modal is not a function #227

Closed ali-heydari-1989 closed 4 years ago

ali-heydari-1989 commented 4 years ago

When I am trying to open the modal with the following code, I get the error modal is not a function, I am sure I brought the library and I can trigger modal with a button .

$("#testModeal").modal({ show: true });

djibe commented 4 years ago

$("#testModal").modal('show');

Official doc here : https://getbootstrap.com/docs/4.3/components/modal/#modalshow

ali-heydari-1989 commented 4 years ago

Thank you for reference but it does not work

searchFarsi.js:43 Uncaught TypeError: $(...).modal is not a function at initSearch (searchFarsi.js:43) at HTMLDocument. (customHomeFa.js:10) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.J (jquery.min.js:2)

djibe commented 4 years ago

Add this to your header :

Can you send your HTML+JS if this doesn't fix ?

djibe commented 4 years ago

@Farham0 Hi, is your problem solved ? Can you close this Issue ?

sesemaya commented 4 years ago

Close due to lack of activities. Please feel free to reopen with new information.

Thanks @djibe for your help.