您好,欢迎来到税程财经网。
搜索
您的当前位置:首页JQuery1.8判断元素是否绑定事件的方法_jquery

JQuery1.8判断元素是否绑定事件的方法_jquery

来源:税程财经网


On previous versions, you could call it like for other data :

obj.data('events');

In jQuery 1.8, this direct access was removed, so in recent versions you must call it like this :

$._data(obj[0],"events")

大概的意思是版本可以使用obj.data('event'); JQuery1.8版本取消了obj.data方法,改为$._data方法

注意:$._data(obj[0],"event") 中的obj[0],一定要加上数组[0]下标,否则会取不到数据
-------以下为举例





Copyright © 2019- shuicheng.net 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务