【问题标题】:JqueryMobile doesn't load linked page at allJqueryMobile 根本不加载链接页面
【发布时间】:2011-02-21 23:01:19
【问题描述】:

我正在尝试使用来自 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> 

【问题讨论】:

  • 您是否尝试过以 http:// 开头的完整链接或删除第一个斜杠以查看会发生什么?另外 - 安装 firebug 并在单击时查看 firefox 尝试加载的内容。这应该可以解决您的问题

标签: jquery jquery-mobile


【解决方案1】:

问题在于它正在寻找的视图不是移动视图。它正在返回一个没有加载 JQM 控件的标准视图。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2020-12-20
  • 2016-10-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-05
  • 2023-04-10
  • 1970-01-01
相关资源
最近更新 更多