问题
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