All Questions

126
votes
6answers
51951 views

What is DOM Event delegation?

Can anyone please explain event delegation in JavaScript and how is it useful?
137
votes
6answers
74244 views

Delegation: EventEmitter or Observable in Angular

I am trying to implement something like a delegation pattern in Angular. When the user clicks on a nav-item, I would like to call a function which then emits an event which should in turn be handled ...
13
votes
2answers
7929 views

event delegation vs direct binding when adding complex elements to a page

I have some markup like this (classes are just for explication): <ol id="root" class="sortable"> <li> <header class="show-after-collapse">Top-Line Info</header> <...
14
votes
2answers
2793 views

JavaScript: How to simulate change event in internet explorer (delegation)

UPDATE: (recap, fiddle and bounty) This question hasn't been getting too much attention, so I'm going to spend some rep on it. I know I tend to be overly verbose in both my answers and questions. Tha...
30
votes
7answers
22170 views

How to stop event bubbling with jquery live?

I am trying to stop some events but stopPropagation does not work with "live" so I am not sure what to do. I found this on their site. Live events do not bubble in the traditional manner and can...
9
votes
3answers
4570 views

What is the difference between target and currenttarget in flex?

Can any one please tell me the difference between target and currenttarget in flex?
14
votes
2answers
7719 views

Vanilla JS event delegation - dealing with child elements of the target element

I'm trying to do event delegation in vanilla JS. I have a button inside a container like this <div id="quiz"> <button id="game-again" class="game-again"><span class="icon-spinner i...
9
votes
1answers
1994 views

How does jQuery.on() work?

I have not seen the source of this function, but I wonder, does it work like this: Selects element(s) by their selecotrs Delegates the provided event-handlers to them Runs a setInterval on that sele...
7
votes
2answers
2564 views

Native JS equivalent to jquery delegation

What is the native implementation for event delegation on dynamically created dom elements? I tried looking at the jquery source but I cant follow the .on method. Note: Currently I attach the event ...
1
votes
1answers
355 views

Moving from classic event management to event delegation in JavaScript OOP

The old event management in which each handler for specific actions was directly attached to the target element is becoming outdated, since considerations about performance and memory saving started s...

Previous Next