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

As of jQuery 1.7, the .live() method is deprecated.

$(".gem").live("click",function(){

replace with

$(".gem").on("click",function(){

.live() is deprecated in older version(1.7 onwards) of JQuery so you need to use .on()

rom the docs:

“As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live().”


总计 0 评论

发表评论

作为 登录 | 登出 »

联系电话

18321263196

交换链接

互相学习

服务咨询

我的微信