jQuery.Deferred exception: $(...).select2 is not a function TypeError

Yii2 returns select 2 errror on console and no jquery functionalities working due to this error

The error is below

jquery.js:4046 jQuery.Deferred exception: $(…).select2 is not a function TypeError: $(…).select2 is not a function
at HTMLDocument. (https://rentandservices.local/tenant/draft/index:683:23)
at mightThrow (https://rentandservices.local/assets/f13ead2589588d210cf416dfa08d493b/jquery.js:3762:29)
at process (https://rentandservices.local/assets/f13ead2589588d210cf416dfa08d493b/jquery.js:3830:12) undefined

How can I solve this issue?Please help anyone…

No help available. Since we cannot peep into your computer to see the code that causes the issue. Post minimal and relevant codes

Try using jQuery(...) instead of $(...)

Hi Bruno,
Thank You So much for the support. Issue fixed

Hi,

issue fixed.Thank You for the support

Thanks & Regards
Maya A

2 Likes