Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/tab.js')
-rw-r--r--js/dist/tab.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/js/dist/tab.js b/js/dist/tab.js
index c5c26bff79..be18a5e085 100644
--- a/js/dist/tab.js
+++ b/js/dist/tab.js
@@ -29,13 +29,6 @@
}
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): tab.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -101,7 +94,7 @@
var selector = Util.getSelectorFromElement(this._element);
if (listElement) {
- var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
+ var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = previous[previous.length - 1];
}
@@ -156,14 +149,7 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
- var activeElements;
-
- if (container && container.nodeName === 'UL') {
- activeElements = $(container).find(Selector.ACTIVE_UL);
- } else {
- activeElements = $(container).children(Selector.ACTIVE);
- }
-
+ var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector.ACTIVE_UL) : $(container).children(Selector.ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);