【发布时间】:2014-06-14 03:13:31
【问题描述】:
我正在构建一个 JQuery Mobile 网络应用程序,并且遇到了一个有趣的问题。我有一个列表视图,当我单击其中一个菜单行时,第 2 页按预期加载。但是,当我单击后退按钮时,第 1 页的页面加载了半秒,然后第 2 页返回(没有过渡)。
这是 2 页的代码:
<section id="more" data-role="page">
<header data-role="header" data-position="fixed" class="AppHeader">
<h1>More</h1>
</header>
<div data-role="content">
<ul data-role="listview" data-filter="false" id="moreList">
<li><a href="#historyOfLandmarks" data-transition="slide"><h1>History of Boston Landmarks</h1></a></li>
</ul>
</div>
</section>
<section id="historyOfLandmarks" data-role="page">
<header data-role="header" data-position="fixed" class="AppHeader">
<a href="#more" data-transition="slide" data-direction="reverse" data-icon="arrow-l" data-rel="back">Back</a>
<h1>History of Boston Landmarks</h1>
</header>
<div data-role="content">
<p>This is a list of National Historic Landmarks in Boston, Massachusetts.</p>
</div>
</section>
JS Fiddle 没有说明问题:http://jsfiddle.net/jakechasan/66vbS/
在其他任何地方,都会出现问题:http://jakeserver.com/Apps/BostonLandmarks/B5/landmarks.html
我不明白为什么 JSFiddle 没有说明问题,但是,我的计算机/服务器上的同一个文件有这个问题?
有什么想法吗?
谢谢。
【问题讨论】:
标签: javascript jquery html css jquery-mobile