]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix cycling in carousel
authorJacob Thornton <jacobthornton@gmail.com>
Tue, 21 Feb 2012 06:01:38 +0000 (22:01 -0800)
committerJacob Thornton <jacobthornton@gmail.com>
Tue, 21 Feb 2012 06:01:38 +0000 (22:01 -0800)
js/bootstrap-carousel.js

index 810256e80a646d1e8cbda4ab072ca805eb211121..aef98fb05aa9eca392ee892f10302a7a1a6538de 100644 (file)
         , fallback  = type == 'next' ? 'first' : 'last'
         , that = this
 
-      if (!$next.length) return
-
       this.sliding = true
 
       isCycling && this.pause()
 
       $next = $next.length ? $next : this.$element.find('.item')[fallback]()
 
+      if ($next.hasClass('active')) return
+
       if (!$.support.transition && this.$element.hasClass('slide')) {
         this.$element.trigger('slide')
         $active.removeClass('active')