1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-17 11:00:56 +02:00
This commit is contained in:
Mark Otto
2016-10-27 09:51:22 -07:00
parent a26080c047
commit 9dbfc90eae
49 changed files with 819 additions and 362 deletions

10
js/dist/tab.js vendored
View File

@@ -44,7 +44,7 @@ var Tab = function ($) {
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',
@@ -79,11 +79,11 @@ var Tab = function ($) {
var target = void 0;
var previous = void 0;
var ulElement = $(this._element).closest(Selector.UL)[0];
var listElement = $(this._element).closest(Selector.LIST)[0];
var 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];
}
@@ -109,7 +109,7 @@ var Tab = function ($) {
target = $(selector)[0];
}
this._activate(this._element, ulElement);
this._activate(this._element, listElement);
var complete = function complete() {
var hiddenEvent = $.Event(Event.HIDDEN, {