jQuery Mobile 1.4 - change page
$.mobile.changePage() is deprecated.
by kalmarsh80
HTML
<!DOCTYPE html>
<html>
<head>
<title>JQM latest</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="http://demos.jquerymobile.com/1.4.0/css/themes/default/jquery.mobile-1.4.0.min.css" />
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://demos.jquerymobile.com/1.4.0/js/jquery.mobile-1.4.0.min.js"></script>
<link rel="stylesheet" href="http://www.idangero.us/sliders/swiper/css/idangerous.swiper.css" />
<script src="http://www.idangero.us/sliders/swiper/js/idangerous.swiper.js"></script>
</head>
<body>
<!-- Page 1 -->
<div data-role="page" style="background:red;">
<div data-role="content" style="background:yellow; height:100%; width:100%;">
<div class="swiper-container" style="background:blue;">
<div class="swiper-wrapper" style="background:gray;">
<!--First Slide-->
<div class="swiper-slide">
<!-- Any HTML content of the first slide goes here -->
<h1>hi</h1>
</div>
<!--Second Slide-->
<div class="swiper-slide">
<!-- Any HTML content of the second slide goes here -->
<h1>hi 2</h1>
</div>
<!--Third Slide-->
<div class="swiper-slide">
<!-- Any HTML content of the third slide goes here -->
<h1>hi3</h1>
</div>
<!--Etc..-->
</div>
</div>
</div>
</div>
</body>
</html>
CSS
/* Specify Swiper's Size: */
.swiper-container, .swiper-slide {
width: 100%;
height: 100%;
}
JavaScript
$(function(){
var mySwiper = $('.swiper-container').swiper({
//Your options here:
mode:'horizontal',
loop: false
//etc..
});
});