幻灯片放映无法正常工作

时间:2016-02-16 12:34:12

标签: javascript jquery html css jquery-mobile

我正在使用jquery mobile并决定使用diashow拍照。问题是幻灯片只在我第二次加载页面时才有效。

我是jquery mobile的新手,并不太知道如何修复它。

我使用了http://www.idangero.us/swiper/#.VsMVPua6nVI

中的滑块
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title></title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.css"/>


<!-- Include the jQuery library -->
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>

<!-- Include the jQuery Mobile library -->
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
Slideshow only works by refreshing the page.

<link rel="stylesheet" type="text/css" href="Swiper-master/dist/css/swiper.min.css">
<script type="text/javascript" src="Swiper-master/dist/js/swiper.min.js"></script>

<link rel="stylesheet" type="text/css" href="slidshow.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
 <script type="text/javascript" src="Swiper-master/dist/js/swiper.jquery.js"></script>

<script>
      $(document).ready(function diashow() {
            var swiper = new Swiper('.swiper-container', 
            {
                pagination: '.swiper-pagination',
                nextButton: '.swiper-button-next',
                prevButton: '.swiper-button-prev',
                paginationClickable: true
            })        
          });
</script>

</head>

0 个答案:

没有答案