-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
drooltip is currently not usable in a SPA, where HTML is added dynamically after drooltip is initialized.
If you would use a event delegation (e.G. from the body) instead of adding the events on each element this issue would be fixed.
Event Delegation is very easy:
document.querySelector('body').addEventListener("click", function(e) {
if (e.target.matches(".myTooltip")) {
// do stuff
}
});
And don't forget to add a polyfill for element.matches :-) (for IE11)
chrschick
Metadata
Metadata
Assignees
Labels
No labels