diff --git a/js/tab.js b/js/tab.js index c0e1e466cd..573b369a7d 100644 --- a/js/tab.js +++ b/js/tab.js @@ -55,7 +55,7 @@ var $active = container.find('> .active') var transition = callback && $.support.transition - && $active.hasClass('fade') + && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) function next() { $active @@ -79,7 +79,7 @@ callback && callback() } - transition ? + $active.length && transition ? $active .one('bsTransitionEnd', next) .emulateTransitionEnd(150) : diff --git a/js/tests/visual/tab.html b/js/tests/visual/tab.html index 37921afecb..28757df6e4 100644 --- a/js/tests/visual/tab.html +++ b/js/tests/visual/tab.html @@ -4,6 +4,9 @@