问题
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