jquery1.8 如何判断事件是否已被绑定

庄家 发布于 2012/08/15 10:37
阅读 2K+
收藏 0
jquery1.8 里的 data(events) 被移除了,请问现在有什么方式能判断某事件是否已被绑定?
$(element).data(“events”) : In version 1.6, jQuery separated its internal data from the user’s data to prevent name collisions. However, some people were using the internal undocumented “events” data structure so we made it possible to still retrieve that via  .data() . This is now removed in 1.8, but you can still get to the events data for debugging purposes via  $._data(element, "events") . Note that this is not a supported public interface; the actual data structures may change incompatibly from version to version.