mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-19 11:51:23 +02:00
dist
This commit is contained in:
27
js/dist/tab.js
vendored
27
js/dist/tab.js
vendored
@@ -45,17 +45,18 @@ var Tab = function ($) {
|
||||
DROPDOWN: '.dropdown',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_UL: '> li > .active',
|
||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle',
|
||||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tab = function () {
|
||||
function Tab(element) {
|
||||
_classCallCheck(this, Tab);
|
||||
@@ -80,7 +81,8 @@ var Tab = function ($) {
|
||||
var selector = Util.getSelectorFromElement(this._element);
|
||||
|
||||
if (listElement) {
|
||||
previous = $.makeArray($(listElement).find(Selector.ACTIVE));
|
||||
var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
||||
previous = $.makeArray($(listElement).find(itemSelector));
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
|
||||
@@ -138,7 +140,14 @@ var Tab = function ($) {
|
||||
Tab.prototype._activate = function _activate(element, container, callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var active = $(container).find(Selector.ACTIVE)[0];
|
||||
var activeElements = void 0;
|
||||
if (container.nodeName === 'UL') {
|
||||
activeElements = $(container).find(Selector.ACTIVE_UL);
|
||||
} else {
|
||||
activeElements = $(container).children(Selector.ACTIVE);
|
||||
}
|
||||
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
|
Reference in New Issue
Block a user