Commit f350d1ba authored by Jochen Berger's avatar Jochen Berger

don't create new Tooltip/Popover objects just to destroy them immediately

parent 8a181a13
......@@ -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)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment