1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
This commit is contained in:
Mark Otto 2017-03-18 16:51:32 -07:00
parent eb2a9da5b4
commit 5a5ab4c0de
2 changed files with 10 additions and 4 deletions

12
js/dist/tab.js vendored
View file

@ -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) {

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long