jqueryfunctionprestashop

TypeError: $(...).owlCarousel is not a function


I am having troubles adding this carousel to my prestashop template.

It returns me the following error:

TypeError: $(...).owlCarousel is not a function navigation : true

And the code using to initialize it is this one

$(document).ready(function() {
  $("#owl-demo").owlCarousel({
    navigation : true
  });
});

I am trying to solve it, but seems imposible, since on an empty html page it works but not when I use it on the Prestashop.

Any clue?

Thanks.


Solution

  • Add owl.carousel.min.js file in your home page and before the file in which you are using add the following code:

    $("#owl-demo").owlCarousel({
        navigation : true
      });
    

    Then only it will work.