Find elements with click event

梦想与她 提交于 2020-01-11 04:43:08

问题


How can each element with a click event found by jQuery (2.2.1)?

This seems to not work anymore:

console.log($._data( $(this)[0], 'events' ))

回答1:


Try

$.each($("*"), function(index, value) {
    if ($._data($(value)[0], "events") != undefined) {
         console.log($._data($(value)[0], "events")
                     , window.jQuery().jquery); 
    };
});

jsfiddle http://jsfiddle.net/guest271314/3dhMM/

jQuery:

  • version: v2.1.2-pre e5190982c40d7ac8ab9bdb2e7e4334f0e123ef66

  • url: http://code.jquery.com/jquery-git2.js

  • date: 2014-07-14T09:04Z


来源:https://stackoverflow.com/questions/24744967/find-elements-with-click-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!