mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 00:54:04 +02:00
enable the ability to destroy tooltips and popovers from elements. related to issue #3453
This commit is contained in:
6
js/bootstrap-popover.js
vendored
6
js/bootstrap-popover.js
vendored
@@ -71,6 +71,12 @@
|
||||
return this.$tip
|
||||
}
|
||||
|
||||
, destroy: function () {
|
||||
var $e = this.$element
|
||||
$e.off()
|
||||
$e.removeData('popover')
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
6
js/bootstrap-tooltip.js
vendored
6
js/bootstrap-tooltip.js
vendored
@@ -235,6 +235,12 @@
|
||||
this[this.tip().hasClass('in') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
, destroy: function () {
|
||||
var $e = this.$element
|
||||
$e.off()
|
||||
$e.removeData('tooltip')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user