mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
don't create new Tooltip/Popover objects just to destroy them immediately
This commit is contained in:
parent
8a181a1388
commit
f350d1ba3d
@ -96,6 +96,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)))
|
||||
|
@ -365,6 +365,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…
x
Reference in New Issue
Block a user