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

前端 未结 6 2280
一整个雨季
一整个雨季 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:28

    If you are using old version of jQuery(< 1.7) then you can use "bind" instead of "on". This will only work in case you are using old version, since as of jQuery 3.0, "bind" has been deprecated.

提交回复
热议问题