diff options
| author | Jochen Berger <[email protected]> | 2013-09-23 15:14:37 +0200 |
|---|---|---|
| committer | Jochen Berger <[email protected]> | 2013-09-23 15:14:37 +0200 |
| commit | f350d1ba3df6f477203d721a213d4f9a753aa17d (patch) | |
| tree | 30f0edd5daa3dd88f2c411a5cfbdd2b4186f4266 | |
| parent | 8a181a138873bbec47c18d70055b0f2e40c810ce (diff) | |
| download | bootstrap-f350d1ba3df6f477203d721a213d4f9a753aa17d.tar.xz bootstrap-f350d1ba3df6f477203d721a213d4f9a753aa17d.zip | |
don't create new Tooltip/Popover objects just to destroy them immediately
| -rw-r--r-- | js/popover.js | 1 | ||||
| -rw-r--r-- | js/tooltip.js | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/js/popover.js b/js/popover.js index ecd37ac23..e313242e8 100644 --- a/js/popover.js +++ b/js/popover.js @@ -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))) diff --git a/js/tooltip.js b/js/tooltip.js index 89802287a..65006e24f 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -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))) |
