You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: page/events/event-delegation.md
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ For the remainder of the lesson, we will reference the following HTML structure:
31
31
When an anchor in our `#list` group is clicked, we want to log its text to the console. Normally we could directly bind to the click event of each anchor using the `.on()` method:
@@ -61,10 +61,10 @@ Understanding how events propagate is an important factor in being able to lever
61
61
62
62
This means that anytime you click one of our bound anchor tags, you are effectively clicking the entire document body! This is called *event bubbling* or *event propagation*.
63
63
64
-
Since we know how events bubble, we can create a *delegated* event:
64
+
Since we know how events bubble, we can create a *delegated* event:
Event delegation refers to the process of using event propagation (bubbling) to handle events at a higher level in the DOM than the element on which the event originated. It allows us to attach a single event listener for elements that exist now or in the future.
0 commit comments