diff --git a/js/popover.js b/js/popover.js index df1a43d8d2..84713bcc68 100644 --- a/js/popover.js +++ b/js/popover.js @@ -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))) diff --git a/js/tooltip.js b/js/tooltip.js index b465b9a8ed..0d3086e9a7 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -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)))