0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-03-15 15:29:22 +01:00
This commit is contained in:
fat 2013-12-26 18:30:16 -08:00
parent 3c73904e17
commit cd0ad94aae
3 changed files with 5 additions and 2 deletions

View File

@ -1364,6 +1364,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} }
Tooltip.prototype.destroy = function () { Tooltip.prototype.destroy = function () {
clearTimeout(this.timeout)
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
} }
@ -1379,6 +1380,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var data = $this.data('bs.tooltip') var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option var options = typeof option == 'object' && option
if (!data && option == 'destroy') return
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
}) })
@ -1486,6 +1488,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var data = $this.data('bs.popover') var data = $this.data('bs.popover')
var options = typeof option == 'object' && option var options = typeof option == 'object' && option
if (!data && option == 'destroy') return
if (!data) $this.data('bs.popover', (data = new Popover(this, options))) if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
}) })

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long