diff options
author | Mark Otto <markdotto@gmail.com> | 2017-03-19 02:51:32 +0300 |
---|---|---|
committer | Mark Otto <markdotto@gmail.com> | 2017-03-19 02:51:32 +0300 |
commit | 5a5ab4c0de0981680fa1764e33967c8d3d4cacf5 (patch) | |
tree | c27ca8e0786a34ab15d26dd6a919484aa592e124 /js/dist/tab.js | |
parent | eb2a9da5b4123ada8e564ba0045132b18bd135ba (diff) |
grunt
Diffstat (limited to 'js/dist/tab.js')
-rw-r--r-- | js/dist/tab.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/js/dist/tab.js b/js/dist/tab.js index eedbc3f8e8..26117b3866 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -45,10 +45,10 @@ var Tab = function ($) { A: 'a', LI: 'li', DROPDOWN: '.dropdown', - LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)', - FADE_CHILD: '> .nav-item .fade, > .fade', + LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu), .list-group:not(.dropdown-menu)', + FADE_CHILD: '> .nav-item .fade, > .list-group-item .fade, > .fade', ACTIVE: '.active', - ACTIVE_CHILD: '> .nav-item > .active, > .active', + ACTIVE_CHILD: '> .nav-item > .active, > .list-group-item > .active, > .active', DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', DROPDOWN_TOGGLE: '.dropdown-toggle', DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' @@ -163,6 +163,9 @@ var Tab = function ($) { Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) { if (active) { $(active).removeClass(ClassName.ACTIVE); + if ($(active).hasClass('list-group-item')) { + $(active).find('a.nav-link').removeClass(ClassName.ACTIVE); + } var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; @@ -174,6 +177,9 @@ var Tab = function ($) { } $(element).addClass(ClassName.ACTIVE); + if ($(element.parentNode).hasClass('list-group-item')) { + $(element.parentNode).addClass(ClassName.ACTIVE); + } element.setAttribute('aria-expanded', true); if (isTransitioning) { |