我正在jquery移动项目上工作。我有两个HTML页面。从index.html我有一个swipeleft事件page.html,它工作正常。从page.html我想swiperight,所以我回到index.html但这不会工作。如何使用jquery mobile从一个html页面滑回另一个页面
如果我在单个文档内部的内部页面之间滑动,而不是在html页面之间滑动,代码工作正常。我需要使用几个HTML页面。
有没有人得到这个工作?将不胜感激的答案。
在我的index.html页面这我我刷卡代码:
<script>
$(document).ready(function() {
$("#main").bind('swipeleft',function(event, ui){
$.mobile.changePage("page.html", "slide");
})
})
</script>
这是我为我的page.html中的代码:
<script>
$(document).ready(function() {
$("#main").bind('swiperight',function(event, ui){
$.mobile.changePage("index.html", "slide");
})
})
</script>