Closed jedierikb closed 7 years ago
Yup. It uses event delegation, so dynamic elements should work. You can try it out by throwing this code into an HTML page where you've got tlite's JS and CSS included:
tlite(function (el) { return el.classList.contains('foo'); });
document.body.innerHTML = '<button class="foo" title="Hi">Hover Here</button>';
Can I add tooltips to elements I've created and added via javascript? Could you provide an example?