jQuery Back Button - transaction hidden page

半世苍凉 提交于 2020-01-05 07:18:16

问题


I’ve build a small single file jQuery Mobile page/site. My site has following flow:
HomePage -> DataPage -> EditData

I have a problem with back button.

I’ve tried to use <a href="#HomePage " data-theme="b" data-icon="arrow-l" data-transition="reverse slide">Back</a> with href pointing to HomePage

All works fine here except the transitions look like it is scrolling through empty page in the middle. Once I remove the reverse all works fine, but the animation is in the wrong direction according to my flow at the top.

Demo here.

Any suggestions?


回答1:


You should use data-direction please check the example from jQM site.

<a href="docs-transitions.html" data-role="button" data-rel="back" class="ui-btn ui-btn-corner-all ui-shadow ui-btn-active ui-btn-up-b" data-transition="slide" data-direction="reverse">

You can also check the other examples from here




回答2:


Remove this part of code from your back button:

data-rel="back"

Because of it it acts as a real back button, and it led you to last page which was SaveDate.



来源:https://stackoverflow.com/questions/13581292/jquery-back-button-transaction-hidden-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!