我正在尝试第一次获得JQuery mobile(1.2.0)与Phonegap(2.2.0)的XCode一起使用。 Xcode的/ PhoneGap的安装工程 - 它已经根据XCode 4.5.1,Cordova 2.2,jquery mobile
然后我添加了jQuery Mobile的CSS和JS到www/JS广告WWW /该项目的CSS已经设置,并有一个简单的索引。 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模拟器。
我在做什么错?日志窗口中没有错误。
亲切的问候
托本
是在'www'目录这个HTML文件?另外,我非常确定你的网站的根目录应该位于:'/ assets/www /'(对于iOS而言,它不同于Android?)。 – Jasper
@Jasper如果我把它放在'www'文件夹中的同一个地方,那么这就是文档所说的 – ryanc1256
我也注意到你的脚本不在'head'或'body'中,他们真的应该在'头' – ryanc1256