Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTieson Trowbridge <ttrowbridge@arivium.com>2018-06-11 23:06:53 +0300
committerJohann-S <johann.servoire@gmail.com>2018-11-20 11:58:04 +0300
commitab183384ee23ddedf1b2ff490e9a42464395b5e6 (patch)
tree17ff8f46dbc5100ee6bc0519165e84601c4f832d /js/src/tab.js
parent7c8cd0f272ff35c4e7bab0b4fe945e54823e82a1 (diff)
Allows both OL and UL lists for tab buttons
Diffstat (limited to 'js/src/tab.js')
-rw-r--r--js/src/tab.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index 99cfbe2e85..b7b0dd12a2 100644
--- a/js/src/tab.js
+++ b/js/src/tab.js
@@ -80,7 +80,7 @@ class Tab {
const selector = Util.getSelectorFromElement(this._element)
if (listElement) {
- const itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE
+ const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE
previous = $.makeArray($(listElement).find(itemSelector))
previous = previous[previous.length - 1]
}
@@ -141,7 +141,7 @@ class Tab {
// Private
_activate(element, container, callback) {
- const activeElements = container && container.nodeName === 'UL'
+ const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL')
? $(container).find(Selector.ACTIVE_UL)
: $(container).children(Selector.ACTIVE)