Fix – uncaught typeerror: $(…).select2 is not a function

If you are getting uncaught typeerror: $(…).select2 is not a function error, this article will help you fix the issue. Consider the example below: we…

The post Fix – uncaught typeerror: $(…).select2 is not a function appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Deven

If you are getting uncaught typeerror: $(…).select2 is not a function error, this article will help you fix the issue.

Consider the example below:

mounted() {
        $('select').select2();
     },

we usually get this error when Jquery is loaded twice, To see if jQuery is loaded properly, type $ in the browser console to see if it returns the appropriate code. If it does, then it is your select2 module.

You may also try checking if Script loading is in correct order like below:

1. jQuery,
2. select2,
3. your js files

The post Fix – uncaught typeerror: $(…).select2 is not a function appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Deven


Print Share Comment Cite Upload Translate Updates
APA

Deven | Sciencx (2021-02-26T16:06:03+00:00) Fix – uncaught typeerror: $(…).select2 is not a function. Retrieved from https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/

MLA
" » Fix – uncaught typeerror: $(…).select2 is not a function." Deven | Sciencx - Friday February 26, 2021, https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/
HARVARD
Deven | Sciencx Friday February 26, 2021 » Fix – uncaught typeerror: $(…).select2 is not a function., viewed ,<https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/>
VANCOUVER
Deven | Sciencx - » Fix – uncaught typeerror: $(…).select2 is not a function. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/
CHICAGO
" » Fix – uncaught typeerror: $(…).select2 is not a function." Deven | Sciencx - Accessed . https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/
IEEE
" » Fix – uncaught typeerror: $(…).select2 is not a function." Deven | Sciencx [Online]. Available: https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/. [Accessed: ]
rf:citation
» Fix – uncaught typeerror: $(…).select2 is not a function | Deven | Sciencx | https://www.scien.cx/2021/02/26/fix-uncaught-typeerror-select2-is-not-a-function/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.