javascript - Add event in the head of the queue -


I have already defined the onclick event I want to add an additional call back function, which is before the pre-defined callback. will be implemented.

  • How to add an event to the top of the queue for the concrete event type?

Are you working with the jquery framework? I am currently working with extjs and I have found a class that you can use or copy.

Let's run Ext> EventManager> removeAll ()

removeAll (string / HTMLElement el): Removes all event handers from zero one element, usually you will use Ext.Element.removeAllListeners on an element in favor of calling this version directly. Parameter: L: String / HTMLMent ID or HTML element in which to extract the event Returns: Zero

I think you should assign tags to body as HTMLElement You can set all the events off (do not regret it)

Download Here> Select jquery adapter, if you are working with jquery, then> extcore will be enough (in this EventManager. Js included).

On the other side, such as crescentfresh (Answer n ° 4), I have created this sample code to apply to all node events:

  var nodes = document.getElementsByTagName ('*'); // Although to collect your nodes (var i = 0; i & lt; nodes.lamp; i ++) {var node = node [i]; Ext.EventManager.removeAll (node); }}  

Please tell me that if you are having trouble using extjs, then I can help, and vote for my answer.


Comments