0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

fix cycling in carousel

This commit is contained in:
Jacob Thornton 2012-02-20 22:01:38 -08:00
parent 06d4756114
commit f046c12bd2

View File

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