[英]jquery mobile app does not show styled text on iPhone
I am trying to build my first project for iOS using PhoneGap. 我正在尝试使用PhoneGap构建我的第一个iOS项目。 I have picked up an example from this page: 我已经从此页面获取了一个示例:
http://www.codeproject.com/Articles/579532/Building-an-iPhone-App-using-jQuery-Mobile http://www.codeproject.com/Articles/579532/Building-an-iPhone-App-using-jQuery-Mobile
And my code looks like this after changing reference to 1.4.1 ans 1.9: 在更改对1.4.1和1.9的引用后,我的代码如下所示:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
<title>Task Timer</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script>
</head>
<body>
<div id="tasksPage" data-role="page">
<div data-role="header" data-position="fixed">
<a href="#" data-role="button">Edit</a>
<h1>Task Timer-1</h1>
<a href="#" data-role="button" data-icon="plus" data-iconpos="notext">Add</a>
</div>
<div data-role="content">
<ul id="taskList" data-role="listview">
<li onclick="alert(1)">Task 1</li>
<li onclick="alert(2)">Task 2</li>
</ul>
</div>
<div data-role="footer" data-position="fixed">
<a href="#" data-role="button">About</a>
</div>
</div>
</body>
</html>
This page, if you copy to an html file will display formatted text. 如果复制到html文件,此页面将显示格式化的文本。 However when I copy the App to iPhone it displays simple text. 但是,当我将应用程序复制到iPhone时,它会显示简单文本。
Can someone please tell me what I am doing wrong? 有人可以告诉我我做错了吗?
I think I have just solved the issue. 我想我已经解决了这个问题。
I made a reference to cordova.js in main html file. 我在主html文件中引用了cordova.js。 And as a precaution copied cordova.js to www folder. 作为预防措施,将cordova.js复制到www文件夹。 And the text started appearing formatted the JQM way. 文本开始以JQM格式显示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.