【jQuery Mobile】学习jQuery Mobile 第一弹 学习jQuery Mobile 第一弹

一、开始jQuery Mobile的使用

要用jQuery Mobile有两种方式,通俗来讲(按我理解)就是:

1、直接在你的.html的head里面引用下面一段

        <meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
	<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
	<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
	<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
在w3school里面可以看得到这个,然后呢,值得注意的是我们一般做中文的东西,一定别忘记在meta里面加上charset="utf-8"这个,所以上述中我是已经加了这一段儿。

2、下载jQuery mobile

 jQuerymobile.com进入这个网址就可以下载。下载后可以在下载的文件中找到几个文件,jquery.js、jquery.mobile-1.4.5.js和jquery.mobile-1.4.5.css,然后你就可以放在你的APP的文件里面了,可以像我这样~

【jQuery Mobile】学习jQuery Mobile 第一弹
学习jQuery Mobile 第一弹

然后在你的.html的head里面就可以写下以下内容

	<meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
	<link rel=stylesheet href="css/jquery.mobile-1.4.5.css">
	<script src="js/jquery.js"></script>
	<script src="js/jquery.mobile-1.4.5.js"></script>

然后你就可以愉快的使用jQuery Mobile了~