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

17,011

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.

Share:
17,011

Related videos on Youtube

Devdan Gaikwad
Author by

Devdan Gaikwad

Updated on September 26, 2022

Comments

  • Devdan Gaikwad
    Devdan Gaikwad almost 2 years

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

  • Devdan Gaikwad
    Devdan Gaikwad about 8 years
    You Look the image on the link?
  • Devdan Gaikwad
    Devdan Gaikwad over 7 years
    As you said, It was right. actually jQuery core included twice. One in content page and another in master page, so it was giving that error ..
  • عثمان غني
    عثمان غني over 6 years
    Perfect answer!