TypeError:$(...).owlCarousel不是函数 [英] TypeError: $(...).owlCarousel is not a function

查看:429
本文介绍了TypeError:$(...).owlCarousel不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将此轮播添加到我的prestashop模板时遇到麻烦.

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

它向我返回以下错误:

TypeError:$(...).owlCarousel不是函数 导航:true

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
  });
});

我正在尝试解决它,但是似乎是不可能的,因为在空的html页面上它可以工作,但在Prestashop上使用时却不能.

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.

有任何线索吗?

谢谢.

推荐答案

在首页中添加owl.carousel.min.js文件,并在使用文件之前添加以下代码:

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
  });

那么只有它能起作用.

这篇关于TypeError:$(...).owlCarousel不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆