gpt4 book ai didi

jquery - Xcode 4.5.1、Cordova 2.2、jquery 移动

转载 作者:行者123 更新时间:2023-12-01 05:58:12 26 4
gpt4 key购买 nike

我第一次尝试让 JQuery mobile (1.2.0) 与 Phonegap (2.2.0) 一起使用 Xcode。 Xcode/Phonegap 安装正常 - 它已根据

进行设置

https://web.archive.org/web/20200806105755/http://docs.phonegap.com/en/2.2.0/guide_getting-started_ios_index.md.html

然后我将jquery mobile css和js添加到该项目的www/js和www/css中,并得到了一个简单的index.html

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.2.0.css"/>
<link rel="stylesheet" type="text/css" href="css/jquery.mobile.structure-1.2.0.css"/>

<title>Test of jquery mobile</title>
</head>
<script type="text/javascript" src="cordova-2.2.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.2.0.js"></script>
<script type="text/javascript" src="js/jquery-1.8.2.js"></script>


<body>
<div data-role="page" id="liveListPage">
<div data-role="header" data-position="fixed" data-theme="a" >
<h1>Header</h1>
</div>

<div data-role="footer" data-position="fixed" data-theme="a" >
<h1>Footer</h1>
</div>
</div>


</body>
</html>

但是当按下“运行”时 - 它构建得很好,但 jquery mobile 似乎根本没有起作用 - 我只是得到 h1“页眉”和“页脚”,没有固定位置,也没有主题。我的方案是 /iPhone 6.0 Simulator。

我做错了什么?日志窗口中没有错误。

最佳答案

这里有几种可能性:

  • 该版本实际上并不是最新的 - xcode 并不总是检测到 Web 文件的更改,因此当您在设备上运行时,您会看到旧版本。清理通常可以解决这个问题。

  • 该链接略有错误 - 通常是大小写问题,因为与桌面操作系统不同,iOS 区分大小写。如果您将 safari Web 检查器附加到您的应用程序,您可以查看哪些文件未加载。

  • 该链接完全错误 - 在桌面浏览器中打开该 html 是否有效?

关于jquery - Xcode 4.5.1、Cordova 2.2、jquery 移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13407170/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com