mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 22:56:46 +02:00
fix carousel event
This commit is contained in:
8
js/bootstrap-carousel.js
vendored
8
js/bootstrap-carousel.js
vendored
@@ -94,9 +94,7 @@
|
||||
, direction = type == 'next' ? 'left' : 'right'
|
||||
, fallback = type == 'next' ? 'first' : 'last'
|
||||
, that = this
|
||||
, e = $.Event('slide', {
|
||||
relatedTarget: $next[0]
|
||||
})
|
||||
, e
|
||||
|
||||
this.sliding = true
|
||||
|
||||
@@ -104,6 +102,10 @@
|
||||
|
||||
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
||||
|
||||
e = $.Event('slide', {
|
||||
relatedTarget: $next[0]
|
||||
})
|
||||
|
||||
if ($next.hasClass('active')) return
|
||||
|
||||
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||
|
Reference in New Issue
Block a user