1
嗨,我正在試驗貓頭鷹旋轉木馬中的自動播放功能,但是每當我切換到另一個網頁選項卡在鉻和回到我的網頁與旋轉木馬,它停止工作,除非我給它一個拖拉的形象。這裏是我的html和jQuery代碼:貓頭鷹旋轉木馬在切換鉻標籤後停止
<!DOCTYPE html>
<html>
<head lang="en">
<title>MySite</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="owl.carousel.min.css">
<link rel="stylesheet" href="owl.theme.default.min.css">
<script type="text/javascript" src="jquery.js"></script>
<script src="owl.carousel.min.js"></script>
</head>
<body>
<div class="owl-carousel">
<div> <img src="1.jpg"></div>
<div> <img src="2.jpg"></div>
<div> <img src="3.jpg"></div>
<div> <img src="4.jpg"></div>
<div> <img src="5.jpg"></div>
<div> <img src="6.jpg"></div>
</div>
<script>
$(document).ready(function(){
var owl = $(".owl-carousel")
owl.owlCarousel({
items:1,
loop:true,
margin:10,
autoplay:true,
autoplayTimeout:3000,
autoplayHoverPause:false
});
owl.trigger('play.owl.autoplay',[5000]);
});
</script>
</body>
</html>
我的hve使用2.2.0版中的保存問題 – naoru