From adaabab81bcc7da1c832ecdab79db9d87f04e5b2 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 29 Dec 2014 20:03:27 -0800 Subject: Revert "Allow multiple delegated tooltip selectors on a node" This reverts commit 1b3237629a316af41945e20837cf3a332798b264. This reverts PR #14189 because it caused major regressions. Fixes #15168. We'll try to revisit #14167's feature request in Bootstrap v4. [skip validator] --- js/tooltip.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'js/tooltip.js') diff --git a/js/tooltip.js b/js/tooltip.js index cda147d9c..a3bed9856 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -445,18 +445,12 @@ function Plugin(option) { return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - var selector = options && options.selector + var $this = $(this) + var data = $this.data('bs.tooltip') + var options = typeof option == 'object' && option if (!data && option == 'destroy') return - if (selector) { - if (!data) $this.data('bs.tooltip', (data = {})) - if (!data[selector]) data[selector] = new Tooltip(this, options) - } else { - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - } + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) } -- cgit v1.2.3