jQuery Fallback for unsupported CSS transitions (IE7/IE8/IE9) #3052

Closed
wants to merge 2 commits into
from
View
@@ -80,6 +80,9 @@
}
, slide: function (type, next) {
+ if(!$.support.transition && this.$element.hasClass('slide')) {
+ this.$element.find('.item').stop(true, true); //Finish animation and jump to end.
+ }
var $active = this.$element.find('.active')
, $next = next || $active[type]()
, isCycling = this.interval
@@ -109,6 +112,17 @@
that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0)
})
+ }else if(!$.support.transition && this.$element.hasClass('slide')) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $active.animate({left: (direction == 'right' ? '100%' : '-100%')}, 600, function(){
+ $active.removeClass('active')
+ that.sliding = false
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
+ })
+ $next.addClass(type).css({left: (direction == 'right' ? '-100%' : '100%')}).animate({left: '0'}, 600, function(){
+ $next.removeClass(type).addClass('active')
+ })
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
View
@@ -19,6 +19,7 @@
display: none;
position: relative;
.transition(.6s ease-in-out left);
+ width: 100%;
}
// Account for jankitude on images
@@ -39,7 +40,6 @@
.prev {
position: absolute;
top: 0;
- width: 100%;
}
.next {