javascript - Find what functionality is bound to a child through event delegation -


If I assign an event to an earlier pastor

  $ (" # Container ") .on (" click "," .distant_child ", function () {// ...}  

When I look at developer tools in Chrome For which events are bound, I only see the incidents of # container . Is there any special element to see a specific method?

assuming that I Do not misunderstand your question, as specific element your meaning is not clear, this is the entrusted is only the # container element The jQuery selector is run at the time of the event to filter the Babelable-Event Elements.

The events assigned are changing the element of a non-ancestor. Then < / Em> implements the jQuery selector against the elements, so that the event was fixed Which NST run element function.

For an ancestor, this delegation allows you to take action on the incidents of those elements which are not even present on event registration time (a very useful thing).

Chrome has never had any event handlers in the form of .distant-child elements.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -