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:
commit
6baf266cda
@ -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)))
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user