diff options
| author | Max Beatty <[email protected]> | 2016-08-04 16:57:08 -0700 |
|---|---|---|
| committer | Max Beatty <[email protected]> | 2016-08-04 16:57:08 -0700 |
| commit | dc1b4e78d49e7c3caedc2918298b646cf8c8200b (patch) | |
| tree | 830e735042b919176aaf1c17fcb872ebe9b9fecc /js/src/tab.js | |
| parent | 0416f761dddae04a1b4d3ce70afece518330ca4d (diff) | |
| download | bootstrap-dc1b4e78d49e7c3caedc2918298b646cf8c8200b.tar.xz bootstrap-dc1b4e78d49e7c3caedc2918298b646cf8c8200b.zip | |
add support for ol in tab plugin. fixes #17754
Diffstat (limited to 'js/src/tab.js')
| -rw-r--r-- | js/src/tab.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/tab.js b/js/src/tab.js index 7bd8f2f9c..7a698851b 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 = () => { |
