Last Updated: February 25, 2016
·
17.05K
· marioloncarek

OwlCarousel2 Chrome fix when resizing the carousel

OwlCarousel 2 has a bug in chrome when resizing the window, it mixes slides together and its not usable anymore.

CSS Fix

.owl-carousel  .owl-wrapper,
.owl-carousel  .owl-item{
-webkit-backface-visibility: hidden;
-moz-backface-visibility:    hidden;
-ms-backface-visibility:     hidden;
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
}

Jquery Fix
```
if ($('.owl-carousel-top').length > 0) {

mainOwlCarousel(); // does the carousel loading

$(window).resize(function () {
    $('.owl-carousel-top').trigger('destroy.owl.carousel').removeClass('owl-carousel owl-loaded');
    $('.owl-carousel-top').find('.owl-stage-outer').children().unwrap();

    mainOwlCarousel();
});

}
```

Source:
https://github.com/smashingboxes/OwlCarousel2/issues/1079