Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Uncaught TypeError: $(...).select2 is not a function" What is the solution?

I am trying to implement searchable drop down list in my project. for that , i searched and got this JQuery plug in "select2" i used it in my project but in browser its showing the like ... This is when inspecting element, showing like this.

I have also added the source path of google api of jquery. and this same is working in my another demo project. but here in my main project, its not working. Is there any solution?? thanking you...

like image 550
Devdan Gaikwad Avatar asked Dec 10 '22 16:12

Devdan Gaikwad


1 Answers

So either the JS file is not loaded correctly or you include jQuery core twice and the second time jQuery loads it wipes away your plugin.

like image 122
epascarello Avatar answered May 12 '23 07:05

epascarello