开发者

JQuery Mobile - always show back button, regardless of entry point

I'm making a mobile site with JQuery Mobile and need to allow entry to any section and still allow the user to navigate backwards.

Example to show what I mean. The JQuery Mobile demo site starts at:

http://jquerymobile.com/demos/1.0a3/

If I click on "Toolbars" I reach:

http://jquerymobile.com/demos/1.0a3/#docs/toolbars/index.html

There is a back-button which leads to the previous site. But if I manually enter the above toolbar URL into my browser the page will not have a back button.

How can I accomplish to always have a back button, while still keeping the nice AJAX backed page loads? The server back-end will generate all html-page开发者_运维问答s so it's fine to "hard code" what the previous section is.


If it's fine to hardcode, then just add

<a href="hardcodedprevious" data-icon="back" /> 

to the header

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜