javascript - Proper manner for applying Jquery UI tooltip to deferred content? -
It seems that this would be a normal matter, but I am not getting any information about it. Maybe it's something I just miss.
All tooltips are working as expected, however, we load some content dynamically, so it is injected after the then tooltip method is called .
What is the best way to tooltips that have been applied to new content, which is injected after pageload?
UPDATE To be clear, I do not no want to inject dynamic content in a tooltip. How do I want to get the Tooltip plug-in to notice new content injected in the page?
Thanks
I will do this: Make your tooltip option reusable It:
var Options = {Content: "Excellent Title!", ...} Then create your first tooltip-input on page load :
$ ('. someclass'). Tooltip (option); Dynamically do this after adding some new elements:
$ (dynamically added content) .tooltip (option);
Comments
Post a Comment