aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-10-24 20:50:52 -0700
committerGitHub <[email protected]>2016-10-24 20:50:52 -0700
commit73154d039252e1eb8318c885770f020d6d410cf4 (patch)
treec2532139047a4bbefe9e3fb1c09ea3fc9424e4c9 /js/src
parent60e51bc918e98ba66b786a4dcf7c46d87b2a1bbb (diff)
parentdc1b4e78d49e7c3caedc2918298b646cf8c8200b (diff)
downloadbootstrap-73154d039252e1eb8318c885770f020d6d410cf4.tar.xz
bootstrap-73154d039252e1eb8318c885770f020d6d410cf4.zip
Merge pull request #20467 from maxbeatty/v4-dev-17754
add support for ol in tab plugin
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tab.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index 4424a7a41..c625a010d 100644
--- a/js/src/tab.js
+++ b/js/src/tab.js
@@ -44,7 +44,7 @@ const Tab = (($) => {
A : 'a',
LI : 'li',
DROPDOWN : '.dropdown',
- UL : 'ul:not(.dropdown-menu)',
+ LIST : 'ul:not(.dropdown-menu), ol:not(.dropdown-menu)',
FADE_CHILD : '> .nav-item .fade, > .fade',
ACTIVE : '.active',
ACTIVE_CHILD : '> .nav-item > .active, > .active',
@@ -85,11 +85,11 @@ const Tab = (($) => {
let target
let previous
- let ulElement = $(this._element).closest(Selector.UL)[0]
+ let listElement = $(this._element).closest(Selector.LIST)[0]
let selector = Util.getSelectorFromElement(this._element)
- if (ulElement) {
- previous = $.makeArray($(ulElement).find(Selector.ACTIVE))
+ if (listElement) {
+ previous = $.makeArray($(listElement).find(Selector.ACTIVE))
previous = previous[previous.length - 1]
}
@@ -118,7 +118,7 @@ const Tab = (($) => {
this._activate(
this._element,
- ulElement
+ listElement
)
let complete = () => {