Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fade in and out owl carousel effect not working

    <script>
    $(document).ready(function () {
          $("#owl-demo").owlCarousel({
              navigation: true,
              navigationText: ["", ""],
              slideSpeed: 300,
              paginationSpeed: 400,
              autoPlay: true,
              mouseDrag: true,
              singleItem: true,
              animateIn: 'fadeIn',
              animateOut: 'fadeOut'
          });
      });
    </script>

Above is my owl carousel quote, i want to have the fade in and out effect but it doesnt seems to appear. Instead it appears as sliding effect.

like image 793
itnotsopro Avatar asked Nov 19 '15 08:11

itnotsopro


3 Answers

Interesting would be which version you are using.. Your code example mixes up options from versions 1.3.* and 2.*.

Since version 2.* you need:

animateIn: 'fadeIn',
animateOut: 'fadeOut',

https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html

In version 1.3.* you need:

transitionStyle: "fade"

http://www.landmarkmlp.com/js-plugin/owl.carousel/#customizing

like image 57
Benjamin Avatar answered Oct 12 '22 20:10

Benjamin


I don't think there is any option for fade transition:

transitionStyle: "fade" // not available in the docs

another option is to use animate.css in conjunction with it:

$("#owl-demo").owlCarousel({
  navigation: true,
  navigationText: ["", ""],
  slideSpeed: 300,
  paginationSpeed: 400,
  autoPlay: true,
  mouseDrag: true,
  singleItem: true,
  animateIn: 'fadeIn', // add this
  animateOut: 'fadeOut' // and this
});
like image 37
Jai Avatar answered Oct 12 '22 22:10

Jai


animateIn: 'fadeIn', animateOut: 'fadeOut',

Will Work version - Owl Carousel v2.2.1

like image 21
Mr. Sen Avatar answered Oct 12 '22 20:10

Mr. Sen