mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
fix slide logic for ie+ in carousel
This commit is contained in:
parent
bce33bbb09
commit
63bd7cb478
Binary file not shown.
14
docs/assets/js/bootstrap-carousel.js
vendored
14
docs/assets/js/bootstrap-carousel.js
vendored
@ -95,13 +95,7 @@
|
||||
|
||||
if ($next.hasClass('active')) return
|
||||
|
||||
if (!$.support.transition && this.$element.hasClass('slide')) {
|
||||
this.$element.trigger('slide')
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
} else {
|
||||
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||
$next.addClass(type)
|
||||
$next[0].offsetWidth // force reflow
|
||||
$active.addClass(direction)
|
||||
@ -113,6 +107,12 @@
|
||||
that.sliding = false
|
||||
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
||||
})
|
||||
} else {
|
||||
this.$element.trigger('slide')
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
}
|
||||
|
||||
isCycling && this.cycle()
|
||||
|
14
js/bootstrap-carousel.js
vendored
14
js/bootstrap-carousel.js
vendored
@ -95,13 +95,7 @@
|
||||
|
||||
if ($next.hasClass('active')) return
|
||||
|
||||
if (!$.support.transition && this.$element.hasClass('slide')) {
|
||||
this.$element.trigger('slide')
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
} else {
|
||||
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||
$next.addClass(type)
|
||||
$next[0].offsetWidth // force reflow
|
||||
$active.addClass(direction)
|
||||
@ -113,6 +107,12 @@
|
||||
that.sliding = false
|
||||
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
||||
})
|
||||
} else {
|
||||
this.$element.trigger('slide')
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
}
|
||||
|
||||
isCycling && this.cycle()
|
||||
|
Loading…
Reference in New Issue
Block a user