0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Merge pull request #10761 from jochenberger/dont-create-tooltip-for-destroy

don't create new Tooltip/Popover objects just to destroy them immediately
This commit is contained in:
Jacob 2013-12-26 18:25:29 -08:00
commit 6baf266cda
2 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,7 @@
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
if (!data && option === 'destroy') return
var options = typeof option == 'object' && option
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))

View File

@ -376,6 +376,7 @@
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tooltip')
if (!data && option === 'destroy') return
var options = typeof option == 'object' && option
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))