使用jquery mobile向右滑动它将显示下一张图片.. 但是,在刷完最后一张图片后,它会显示一个空白页,是否有办法禁用最后一张图像上的滑动?
我也将宽度设置为100%,因为我希望它占用浏览器的大小 但是我无论如何都无法缩放以启用缩放。
$("img").on("swiperight", function () {
$(this).hide().next().show('slide', {
direction: 'left'
}, 1000);
});
$("img").on("swipeleft", function () {
$(this).hide().prev().show('slide', {
direction: 'right'
}, 1000);
});
img {
width: 100%;
}
.hide {
display: none;
}
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.slide.js"></script>
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.core.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<img src="http://borisute.com/geshem/2013/mgottlieb/app/yom_rishon_jpeg/yr%20(1).jpg"/>
<img class="hide" src="http://borisute.com/geshem/2013/mgottlieb/app/yom_rishon_jpeg/yr%20(2).jpg"/>
http://jsfiddle.net/g9fxr3az/3/
由于