jQuery Mobile的缺少后退按钮列表视图中 [英] jQuery Mobile Missing Back Button in Listviews
问题描述
我想我已经读一些关于那里是在jQuery Mobile的后退按钮的问题?在看文档和演示了使用嵌套列表我仍然缺少这回按钮后 - 这是我在尝试这样的:(超级简化版本,因为它仍然有问题)
I think I have read something about there being issues with the Back button in jquery mobile? After looking at docs and demos for using a nested list I am still missing this back button - this is how I am attempting this: (super simplified version because its still having issues)
<div data-role="page">
<div data-role="header">....</div>
<div data-role="content">
<ul data-role="listview">
<li>Item 1
<ul><li>Item 1 - 2</li><li>Item 1 - 3</ul>
</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</div>
<div data-role="footer">....</div>
</div>
据我所知,这应该有3个项目的列表 - 当项目1,点击它应该带你到第二个页面,其中2个项目项目1 - 2名单和项目1 - 3同时此页面上的应该是项目1为标题标题标题栏和也应该有一个返回按钮正确?
to my knowledge this should have a list of 3 items - when "Item 1" is clicked it should take you to a second page with a list of 2 Items "Item 1 - 2" and "Item 1 - 3", also on this page should be a header bar with "Item 1" as the header title and there should also be a back button correct??
我也尝试:
<div data-role="page" data-add-back-btn="true">......</div>
如果有人可以帮助我走出这将是巨大的。我使用jQuery 1.6.2版和jQuery Mobile版1.0b3。
If anyone could help me out that would be great. I am using jQuery version 1.6.2 and jQuery Mobile version 1.0b3.
推荐答案
你有没有试图改变全局配置的后退按钮?
Have you tried changing your global config for the backbutton?
下面是该文档的更改配置: http://jquerymobile.com/test/文档/ API / globalconfig.html
Here's the docs for changing the config: http://jquerymobile.com/test/docs/api/globalconfig.html
基本上你只需要添加类似:
Basically you just add something like:
$(document).bind("mobileinit", function(){
$.mobile.page.prototype.options.addBackBtn = true;
});
这篇关于jQuery Mobile的缺少后退按钮列表视图中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!