the5fire

关注Python、Django、Vim、Linux、Web开发、团队管理和互联网--Life is short, we need Python.


jquery获取元素绑定的事件

作者:the5fire | 标签:       | 发布:2013-07-02 6:22 a.m. | 阅读量: 21534, 20272

一个简单的记录,在调试jquery的事件绑定时会用到。查看某元素是否绑定上了事件。

在JQuery1.8之前:

obj=$('div.event');obj.data('events');

在JQuery1.8中:

objs=$('div.event');$._data(objs[0],'events');

参考:

http://stackoverflow.com/questions/12214654/jquery-1-8-find-event-handlers

- from the5fire.com
----EOF-----

微信公众号:Python程序员杂谈


其他分类: