2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-27 14:46:01 +03:00

Revert "Allow multiple delegated tooltip selectors on a node"

This reverts commit 1b3237629a.
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]
This commit is contained in:
Chris Rebert
2014-12-29 20:03:27 -08:00
parent 32cb071594
commit adaabab81b
4 changed files with 8 additions and 81 deletions
+4 -10
View File
@@ -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]()
})
}