是否可以显示所有活动的jQuery bind()?

Pet*_*ter 6 javascript jquery

是否有可能显示所有活跃的jQuery bind()

use*_*716 4

您可以显示 jQuery 元素引用的所有数据:

console.log(jQuery.cache);  // Logs the entire cache
Run Code Online (Sandbox Code Playgroud)

或者仅对于事件(对于具有事件的元素):

for(name in jQuery.cache) {
    if(jQuery.cache[name]['events'])
       console.log(jQuery.cache[name]['events']);
}
Run Code Online (Sandbox Code Playgroud)