JqueryMobile 根本不加载链接页面
我正在尝试使用 CDN 中的最新 Alpha 版本 (3) 和 jQuery 1.5 来让 jQueryMobile 正常工作。呈现的代码如下。每当我单击页面上的链接时,它只会位于旋转器上并且永远不会加载。但是当我单击源中的链接时,页面会加载。有人有什么想法吗?
<!DOCTYPE html>
<html>
<head>
...
<link href='http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css' rel='stylesheet' type='text/css'>
<script src='http://code.jquery.com/jquery-1.5.min.js'></script>
<script src='http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js'></script>
</head>
<body>
<div data-role='page'>
<div data-role='header'>
<h1>Some Text</h1>
</div>
<div data-role='content'>
<ul data-role='listview'>
<li><a href="/persons/1">This is a test</a></li>
</ul>
</div>
</div>
<div id='footer'>Some text</div>
</body>
</html>
I'm trying to get jQueryMobile working using that latest Alpha release (3) and jQuery 1.5 from the CDNs. The code that is rendered is below. Whenever I click on the link from the page, it just sits on the spinner and never loads. But when I click on the link from the source, the page loads. Anyone have any ideas?
<!DOCTYPE html>
<html>
<head>
...
<link href='http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css' rel='stylesheet' type='text/css'>
<script src='http://code.jquery.com/jquery-1.5.min.js'></script>
<script src='http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js'></script>
</head>
<body>
<div data-role='page'>
<div data-role='header'>
<h1>Some Text</h1>
</div>
<div data-role='content'>
<ul data-role='listview'>
<li><a href="/persons/1">This is a test</a></li>
</ul>
</div>
</div>
<div id='footer'>Some text</div>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是它正在寻找的视图不是移动视图。它返回一个标准视图,其中没有加载 JQM 控件。
The problem was that the view it was looking for was not a mobile view. It was returning a standard view which didn't have the JQM controls loaded onto it.