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:
parent
06d4756114
commit
f046c12bd2
4
js/bootstrap-carousel.js
vendored
4
js/bootstrap-carousel.js
vendored
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user