]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Merge pull request #11416 from danielboendergaard/carousel-duration
authorMark Otto <markdotto@gmail.com>
Wed, 18 Dec 2013 23:01:47 +0000 (15:01 -0800)
committerMark Otto <markdotto@gmail.com>
Wed, 18 Dec 2013 23:01:47 +0000 (15:01 -0800)
Carousel: Use the transition duration from CSS

1  2 
js/carousel.js

diff --cc js/carousel.js
index 67cf0e5694fe0d7ff62d6235e215aecc5aff48bd,08a45a4f56e64a02162731538c80f5c01d858bb8..b55184bc424bd78b779d85cb15bf7e6dc6ac19df
            $next.removeClass([type, direction].join(' ')).addClass('active')
            $active.removeClass(['active', direction].join(' '))
            that.sliding = false
 -          setTimeout(function () { that.$element.trigger('slid') }, 0)
 +          setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
          })
-         .emulateTransitionEnd(600)
+         .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
      } else {
        this.$element.trigger(e)
        if (e.isDefaultPrevented()) return