Provide way to destroy tooltip #8

benkutil opened this Issue Jul 8, 2011 · 12 comments


None yet
7 participants

benkutil commented Jul 8, 2011

Is there a way to destroy a tooltip? If not, that would be a helpful method to have access too.

benkutil commented Jul 8, 2011

Sorry, I didn't see the closed issues.

Here’s the specific use case why I’d like to destroy tool tips.

I‘m using them to show error validations, and checking validations. When a form becomes valid, I want the tooltip to update to be the valid text. Easiest way I see to do it with this plugin is to delete the current tooltip and create a new one with the valid text in it.


briancray commented Jul 28, 2011

with tooltipsy as the class name of the original selector...

$('.tooltipsy').data('tooltipsy').$tip.html('new content');

deleting/recreating tooltips is unnecessary cycles. This will allow you to change the content without any DOM manipulation

@briancray briancray closed this Jul 28, 2011

@briancray briancray reopened this Jul 28, 2011

rcherny commented Aug 6, 2011

I need to do the same thing benkutil mentioned. except i don't need to update it. the field with the error gets a tooltip and when it's corrected the tooltip is removed. any easy way to do that? looking for an "unbind" or clear type thing ... can we remove the .data() or something?

Hello, first of all thanks for the plugin, but I am having some issues with it. Mostly, I want to destroy it, like has been suggested.

+1 for "destory" options. I'm looking to implement tooltips for error messages dynamically generated by the jQuery Validation plugin. When the field has an error that error is shown in the tooltip (on hovering over the input). Once the field is valid the tooltip should be destroyed.

I think this is a pretty popular use case for tooltips.


briancray commented Aug 23, 2011

Will add a destroy option.


briancray commented Aug 29, 2011

Added a destroy method, but since Lion removed git I'm waiting for Xcode to install. But the update's coming soon!


briancray commented Sep 7, 2011

Added method in new commit: $('.hastip').data('tooltip').destroy(); where .hastip is the original selector.

@briancray briancray closed this Sep 7, 2011

There is some problem about destroying. When you call the destroy function, it destroys the $tipsy, but when I destroy a tooltip that hasn't been shown yet, that var is undefined, causing an error and not unbinding the data from the element.


briancray commented Jul 10, 2012

I'll check it out

zkwentz commented Feb 11, 2013

I'll check it out

Any word on this?


briancray commented Feb 13, 2013

Fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment