简体   繁体   English

奇怪的猫头鹰轮播行为

[英]Strange Owl carousel behaviour

I have been trying to fix owl carousel for days now and cant find any online solution that would help me. 我几天来一直在尝试修复猫头鹰轮播,无法找到任何对我有帮助的在线解决方案。 Maybe you as web gurus can help me out :). 也许您作为网络​​专家可以帮助我:)。

I am loading the owl CSS at head tag. 我在头标签上加载了猫头鹰CSS。 Then at the bottom Im loading this: 然后在底部即时通讯加载此:

<script src="assets/plugins/owl-carousel2/owl.carousel.js"></script>
<script type="text/javascript" src="assets/js/plugins/owl-carousel2.js"></script>
<script>
$(function() {
  App.init();
  OwlCarousel.initOwlCarousel();
  ContactForm.initContactForm();
  CirclesMaster.initCirclesMaster();
  ProgressBar.initProgressBarHorizontal();
  new WOW().init();
});
</script>

And Im getting this, its vertical instead of horizontal and obviously there are some problems in there. 我得到的是它的垂直而不是水平,显然那里存在一些问题。 Just cant work out what it is... 只是无法弄清楚它是什么...

在此处输入图片说明

If no error found in console, check the net tab to see if all external files are loaded properly. 如果在控制台中未发现错误,请检查net选项卡以查看是否正确加载了所有外部文件。

Make sure you have added init code like the people in comments have said - check the javascript tab from example here - http://www.owlgraphic.com/owlcarousel/demos/images.html 确保您已添加注释中的人说的初始化代码-在此处的示例中检查javascript标签-http: //www.owlgraphic.com/owlcarousel/demos/images.html

If you still don't get proper output, try adding this below your init lines to see if carousel is getting initialised properly - 如果仍然无法获得正确的输出,请尝试将其添加到init行下方,以查看轮播是否已正确初始化-

var owl = $(".your-selector-here").data('owlCarousel');
console.log(owl);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM