问题描述
我的标题中有一个后退按钮,如下所示:
I have a back button in my header that looks like:
<a href="index.html" data-role="button" data-direction="reverse"
data-icon="arrow-l" data-iconpos="left">Back</a>
到达此页面的转换是 slide
并根据,添加 data-direction =reverse
到我的后退按钮应该反转让我进入该页面的转换,即:上一页应该向后滑动。但是,这似乎只停留在默认的淡入淡出
转换上。在设置此按钮时,我做错了吗?我应该有一种不同的href吗?
The transition to get to this page is slide
and, according to the documentation, adding data-direction="reverse"
to my back button should 'reverse' the transition that got me to that page, ie: the previous page should slide back. However, this seems to be stuck just on the default fade
transition. Is there something I have done wrong in setting this button up? Should I have a different kind of href?
推荐答案
尝试添加这个:
data-rel="back"
<a href="/" data-icon="back" data-rel="back" data-direction="reverse">Back</a>
此外,我认为为了使反向工作,您必须引用之前的确切URL /页面。因此,如果你的page1是/,那么你去了page2和第2页你有href =index.html它将不起作用。
Also I think in order for "reverse" to work you must reference the exact previous URL/page. So if your page1 is "/" then you went to page2 and on page2 you have href="index.html" it won't work.
这篇关于JQuery Mobile:数据方向=“反向”没有模仿初始过渡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!