darktooltip icon indicating copy to clipboard operation
darktooltip copied to clipboard

update tooltip content after its initialized

Open artknight opened this issue 9 years ago • 3 comments

How do you update/change the tooltip content after its initialized?

e.q. $('#button').darkTooltip({ content:'something' }); .... later in the code

$('#button').darkTooltip({ content:'something else' });

Thanks,

artknight avatar Jun 22 '15 14:06 artknight

Unfortunately, there is no method to do that, but you can always find the selector for the content and change it using jquery

rubentd avatar Jun 23 '15 12:06 rubentd

hmm, a destroy function would be an idea to solve this problem: after updating over jquery I see both the new- and the old button-content! Seems that the item's children still have the old content and their own event!!

<li id="shopcart"  data-tooltip="#cart">
        <a href="/shoppingcart/manage/">link</a></li>

I want to have the current shopping cart in the tip. wasnt able to load in the html content using Ajax, so I use the html in #cart and want to re-initialize the tooltip. What is my workaround?

dzaal avatar Aug 14 '16 13:08 dzaal