查找节点的事件处理程序 [英] Find event handlers for a node
问题描述
我想暂时挂起节点的click事件。
I want suspend the click event for a node temporarily .
我想获取节点的click事件处理程序并将其分离,然后在需要时重新附加它。
I want to get the click event handler for a node and detach it and then reattach it when I want it again.
我正在使用YUI 3。
I am using YUI 3.
有人可以告诉我如何查询节点的click事件处理程序并将其分离吗?
Can some one tell me how could I query the click event handlers for a node and detach them?
推荐答案
请参阅Y.Event.getListeners- http://yuilibrary.com/yui/docs/api/classes/Event.html#method_getListeners
See Y.Event.getListeners - http://yuilibrary.com/yui/docs/api/classes/Event.html#method_getListeners
有关分离事件的所有各种方式,请参见 http://yuilibrary.com / yui / docs / event /#detach-methods
For all the various ways you can detach events, see http://yuilibrary.com/yui/docs/event/#detach-methods
这篇关于查找节点的事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!