calebjacob / tooltipster

A jQuery tooltip plugin
MIT License
2.76k stars 480 forks source link

Tooltips to objects declared through js #742

Closed Erriour closed 5 years ago

Erriour commented 6 years ago

I have code to declare tooltips if parameter "title" detected: $('[title]').tooltipster({ theme: 'tooltipster-borderless', });

When I'm writing something like: $('.my_place').html("<a title="Test">Test</a>"); it doesn't work. Why? I can't move code to html because some titles generated dynamically...

louisameline commented 5 years ago

Because you create html without initializing the tooltip on it. Please read the FAQ about delegation, it might be what you are looking for. Thank you