Javascript jquery移动刷卡功能
我在ipad的web应用程序上设置了一个滑动功能,一旦用户用手指向右滑动,它就会将用户带到他们访问的最后一页。javascript看起来像这样Javascript jquery移动刷卡功能,javascript,jquery,ios,jquery-mobile,Javascript,Jquery,Ios,Jquery Mobile,我在ipad的web应用程序上设置了一个滑动功能,一旦用户用手指向右滑动,它就会将用户带到他们访问的最后一页。javascript看起来像这样 <script> $(document).bind('swiperight', function () { history.back(); });</script> $(文档).bind('swiperight',函数(){ 历史。返回(); }); 考虑到这一点,如果我想使函数更精确,以便它
<script>
$(document).bind('swiperight', function () {
history.back();
});</script>
$(文档).bind('swiperight',函数(){
历史。返回();
});
考虑到这一点,如果我想使函数更精确,以便它可以更改为特定的页面,我会合并JQM change page函数吗
<script>
$(document).bind('swiperight', function () {
$.mobile.changePage( "#home", { transition: "slide"} );
});</script>
$(文档).bind('swiperight',函数(){
$.mobile.changePage(“#home”{transition:“slide”});
});
我应该把data direction=“reverse”的属性放在哪里?它应该是这样的:
$(document).bind('swiperight', function () {
$.mobile.changePage("#home", {
transition: "slide",
reverse: true
});
});
看起来应该行得通,但不知什么原因不行。我会把它弄得乱七八糟,看看是怎么回事。谢谢