我遇到了iPhone問題並滑動到其他頁面。當向下滾動頁面時,動作的敏感度很敏感,並會滑動到下一頁。有沒有一種方法來驗證碼內控制刷卡靈敏度:用jQuery Mobile更改滑動敏感度
<script type="text/javascript">
$(document).ready(function(){
var counter = 1;
$(document).bind('swipeleft','#deal_1',function (event, ui) {
counter++;
if(counter>3)
counter = 1;
var nextpage = 'dailydeal'+counter+'.html';
if (nextpage.length > 0) {
$.mobile.changePage(nextpage, {transition: "slide",
reverse: false}, true, true);
}
});
$(document).bind('swiperight','#deal_1',function (event, ui) {
counter--;
if(counter<1)
counter=3;
var prevpage = 'dailydeal'+counter+'.html';
if (prevpage.length > 0) {
$.mobile.changePage(prevpage, {transition: "slide",
reverse: true}, true, true);
}
});
});
</script>
這是一個真棒答案。我將它用於我的應用程序,然後從Chrome瀏覽器中再次輕掃即可。 –
真棒,這個答案應該得到剔! – TobiasW
這是一個很好的迴應,它幫助我瞭解了Android中jquerymobile swipe的一個問題,id有人有問題,你可以試試這個。 – Ramon