vendor/assets/javascripts/_tab.js in active_frontend-12.2.0 vs vendor/assets/javascripts/_tab.js in active_frontend-12.3.0
- old
+ new
@@ -3,14 +3,16 @@
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
+ // jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
+ // jscs:enable requireDollarBeforejQueryAssignment
}
- Tab.VERSION = '3.3.2'
+ Tab.VERSION = '3.3.6'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () {
var $this = this.element
@@ -54,11 +56,11 @@
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
- && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
+ && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
@@ -77,10 +79,10 @@
element.addClass('in')
} else {
element.removeClass('fade')
}
- if (element.parent('.dropdown-menu')) {
+ if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
\ No newline at end of file