jQuery Mobile:离线测试 [英] JQuery mobile: test offline

查看:81
本文介绍了jQuery Mobile:离线测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JQuery Mobile的新手.我真的很喜欢,但是我有两个基本问题:

I am new in JQuery Mobile. I really like it but I have 2 basic questions:

1-我可以在iPhone上离线测试应用程序吗?

1- Can I test the app OFFLINE in my iPhone?

我知道在连接互联网时如何查看应用程序,甚至如何创建图标.但是我没有互联网连接,所以我看不到如何查看该应用程序.

I know how to see the app when I am with an Internet connection even how to create the icon. But I don't see how to see the app i I don't have an Internet connection.

2-我想我可以将jQuery Mobile制成的html和css作为任何应用程序发送给Apple.而且它将离线运行.是吗?

2- I suppose I can sent the html and css made with jQuery Mobile to Apple as any app. And it will work offline. Is that right?

是否有经验丰富的人使用JQuery Mobile完成了应用程序并在应用程序商店中工作?

Is there anyone with experience who have done apps with JQuery Mobile and are working in the app store?

推荐答案

是的,您可以使jQuery Mobile页面完全脱机.

Yes, you can have a jQuery Mobile page completely offline. Download the necessary libraries to your device. For the example I used the following

  • jquery-1.8.0.min.js
  • jquery.mobile-1.2.0.min.js

此外,您还需要jQuery Mobile CSS结构文件

Additionally you need the jQuery Mobile CSS structure file

  • jquery.mobile.structure-1.2.0.min.css

然后使用主题滚动条创建自己的滚动条CSS(或不做任何更改就使用默认的jQuery CSS)并将其(包括图标集)下载到您的设备上.对于该示例,我使用了此CSS名称

Then use the theme roller to create your own CSS (or without changes just use the default jQuery CSS) and download it including the icon sets to your device. For the example I used this CSS name

  • taifun.min.css

图标集存储在子目录/images中.

The icon sets are stored in the subdirectory /images.

示例代码

<!DOCTYPE html>
<html>
<head>
  <title>Offline</title>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="taifun.min.css" />
  <link rel="stylesheet" href="jquery.mobile.structure-1.2.0.min.css" />
  <script src="jquery-1.8.0.min.js"></script>
  <script src="jquery.mobile-1.2.0.min.js"></script>
</head>

<body>
  <div data-role="content">
    <h1>I'm a jQuery Mobile offline page</h1>
    <ul data-role="listview">
      <li><a href="#">Acura</a></li>
      <li><a href="#">Audi</a></li>
      <li><a href="#">BMW</a></li>
      <li><a href="#">Cadillac</a></li>
    </ul>
  </div><!--/content -->
</body>
</html>

HTC Desire截图

screenshot HTC Desire

这篇关于jQuery Mobile:离线测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆