-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add popover / tooltip destroy method #3880
Conversation
Add js tooltip function so a tooltip can be called without using rel= Update tooltip html to reflect new js function Include changes from twitter/bootstrap issue twbs#3888 Include changes from twitter/bootstrap issue twbs#3885 Include changes from twitter/bootstrap issue twbs#3884 Include changes from twitter/bootstrap issue twbs#3880 Include changes from twitter/bootstrap issue twbs#3878 Include changes from twitter/bootstrap issue twbs#3876 Include changes from twitter/bootstrap issue twbs#3875
@@ -235,6 +235,12 @@ | |||
this[this.tip().hasClass('in') ? 'hide' : 'show']() | |||
} | |||
|
|||
, destroy: function () { | |||
var $e = this.$element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change this to this.$element.off().removeData('tooltip')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, done.
Add popover / tooltip destroy method
This is going to break code where the element has other events defined. If I say $foo.tooltip('destroy'), I don't want other events that are tied to the element to be removed. |
@nathanbowser Yea, I was thinking about that too. I'll submit a pull request fixing it unless @fat just wants to do it. |
related to my comments on issue #3453
includes simple implementation, docs, a small random fix to docs and unit tests.