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

Xavi Alsina picture Xavi Alsina · Feb 9, 2014 · Viewed 81.8k times · Source

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.

Answer

Manoj Verma picture Manoj Verma · Feb 8, 2015

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.