Detecting Handlers of a jQuery “Live” Event?

Live events are added to the document. Use.

Live events are added to the document. Use $(document). Data('events').

Click The above will return an array of objects containing information about each bound click handler. Each of these objects has a selector property containing the selector that was used at the time of binding with $(selector). Live(.., ..).

Any of these selectors that matches the element with id foo will get triggered when #foo is clicked. Note that the selector does not have to be exactly #foo for that to happen. There are many other selectors that can be used to target an element.

For example if #foo was a , then a live click handler such as $("p"). Live("click", function..) will also target #foo. Here's one approach.

Loop through each object, and see if any of the elements matching the selector property include #foo. Var handlers = $(document). Data('events').

Click; // jQuery quirk: $. Map callback takes arguments (obj, index) and // $(..). Map takes callback arguments as (index, obj) var fooClickHandlers = $.

Map(handlers, function(handler) { if($(handler. Selector). Is('#foo')) { return handler; } return null; }); // fooClickHandlers is a list of all handlers that will fire on #foo click.

Thank you. – Anderson De Andrade May 23 '10 at 20:05 @Anderson .. updated the answer for your comment. – Anurag May 23 '10 at 20:58.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions