-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hello! Thanks a lot for module!
I have code how:
delegate('.container', '.item', 'click', (e) => {
// some actions
});
delegate('.container', '.link', 'click', (e) => {
e.preventDefault();
e.stopPropagation();
// some actions
});
And html:
<div class="container">
<div class="item">
<a href="#" class="link">click 1</a>
</div>
<div class="item">
<a href="#" class="link">click 2</a>
</div>
<div class="item">
<a href="#" class="link">click 3</a>
</div>
</div>
And when I click on the link the parent clickItem function fires
Metadata
Metadata
Assignees
Labels
No labels