Commit 63bd7cb4 authored by Jacob Thornton's avatar Jacob Thornton

fix slide logic for ie+ in carousel

parent bce33bbb
...@@ -95,13 +95,7 @@ ...@@ -95,13 +95,7 @@
if ($next.hasClass('active')) return if ($next.hasClass('active')) return
if (!$.support.transition && this.$element.hasClass('slide')) { 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 {
$next.addClass(type) $next.addClass(type)
$next[0].offsetWidth // force reflow $next[0].offsetWidth // force reflow
$active.addClass(direction) $active.addClass(direction)
...@@ -113,6 +107,12 @@ ...@@ -113,6 +107,12 @@
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0) 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() isCycling && this.cycle()
......
...@@ -95,13 +95,7 @@ ...@@ -95,13 +95,7 @@
if ($next.hasClass('active')) return if ($next.hasClass('active')) return
if (!$.support.transition && this.$element.hasClass('slide')) { 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 {
$next.addClass(type) $next.addClass(type)
$next[0].offsetWidth // force reflow $next[0].offsetWidth // force reflow
$active.addClass(direction) $active.addClass(direction)
...@@ -113,6 +107,12 @@ ...@@ -113,6 +107,12 @@
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0) 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() isCycling && this.cycle()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment