TypeError: $(…).on is not a function

前端 未结 6 2281
一整个雨季
一整个雨季 2020-12-09 14:49

I am using jQuery litebox. After adding JS and CSS files I got this error TypeError:

$(...).on is not a function at this line in js file                             


        
6条回答
  •  执笔经年
    2020-12-09 15:41

    I tried the solution of Oskar (and many others) but for me it finaly only worked with:

    jQuery(function($){
       // Your jQuery code here, using the $
    });
    

    See: https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/

提交回复
热议问题