更新我的源代码后,我的轮播不再有用了。我点击的图片,据说打开了图片滑块(Carousel),但现在打开一个新图片链接。
<div id="owl-carousel-works" class="owl-carousel owl-theme">
<div class="item">
<div class="latest-item col-md-12" >
<a href="images/screenshots/MainPage.png" title="screen #1" data-lightbox-gallery="screenshots-gallery">
<img src="images/screenshots/MainPage.png" class="img-responsive" alt=""/>
</a>
</div>
</div>
<div class="item">
<div class="latest-item col-md-12 " >
<a href="images/screenshots/7.png" title="screen #2" data-lightbox-gallery="screenshots-gallery">
<img src="images/screenshots/7.png" class="img-responsive" alt=""/>
</a>
</div>
</div>
包括所有样式表
<link href="css/owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="css/owl-carousel/owl.theme.css" rel="stylesheet">
<link href="css/owl-carousel/owl.transitions.css" rel="stylesheet">
包括所有javascripts
<script src="js/modernizr.custom.min.js"></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="js/responsive-nav.js"></script>
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.easing.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/nivo-lightbox.min.js"></script>
<script src="js/jquery.appear.js"></script>
<script src="js/jquery.inview.js"></script>
<script src="js/jquery.animateNumber.min.js"></script>
<script src="js/jquery.fitvids.js"></script>
<script src='js/jquery.scrollTo.js'></script>
<script src="js/wow.min.js"></script>
<script src="js/script.js"></script>
<script src="js/fastclick.js"></script>
<script src="js/scroll.js"></script>
<script src="js/fixed-responsive-nav.js"></script>
我的javascript文件中没有错误。以下是我对owl-carousel的配置...
/* screenshot slider */
var owl = $("#owl-carousel-works");
owl.owlCarousel({
itemsCustom: [
[0,1],
[900,2],
[1800,3],
[2700,4],
[3600,5],
[4500,6]
],
navigation: false
});
// Nivo Lightbox
$('#screenshots a').nivoLightbox({
effect: 'fadeScale'
});
// team carousel
var owl = $("#owl-carousel-team");
owl.owlCarousel({
itemsCustom: [
[0,1],
[900,2],
[1800,3],
[2700,4],
[3600,5],
[4500,6]
],
navigation: false
});