JQuery Mobile最新2011年6月3日版本-无后退按钮 [英] JQuery Mobile Latest 03 June 2011 Version - No back button

查看:54
本文介绍了JQuery Mobile最新2011年6月3日版本-无后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在是2011年6月3日,我正在使用JQuery Mobile的最新版本.

It's the 3rd June 2011 and I'm using JQuery Mobile's latest version.

我的问题是后退按钮不见了.

My problem is that the back button has gone.

如何让后退按钮显示出来?

How can I get the back button to show up please?

更新:

我已经尝试过了,但仍然没有后退按钮.

I've tried this but still not back button.

<body> 
<div data-role="page" data-theme="a" data-iscroll="enable" data-add-back-btn="true">

    <div data-role="header" data-theme="a" data-backbtn="true">
        <h1>title here</h1>

        <a href="index.php" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-left jqm-home">Home</a>
        <a href="view.php" data-icon="arrow-r" data-theme="a" data-iconpos="right">Events</a>
    </div><!-- /header -->

    <div data-role="content">

推荐答案

如果您查看

If you look at the jQuery mobile blog post in may, the back button is now off by default.

要重新启用后退按钮,只需在页面容器中添加data-add-back-btn="true":

To reenable the back button simply add data-add-back-btn="true" to the page container:

<div data-role="page" id="page1">
    <div data-role="header">
        <h1>First page</h1>
    </div>
    <div data-role="content">
        <p><a href="#page2">page2</a></p>
    </div>
    <div data-role="footer">
        <h4>Optional footer</h4>
    </div>
</div>
<div data-role="page" id="page2" data-add-back-btn="true">
    <div data-role="header">
        <h1>Second Page</h1>
    </div>
    <div data-role="content">  
        <p><a href="#page1">page1</a></p>
    </div>
    <div data-role="footer">
        <h4>Optional footer</h4>
    </div>
</div>

jsfiddle上的后退按钮示例

Example of the back button on jsfiddle

这篇关于JQuery Mobile最新2011年6月3日版本-无后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆