在本地正确引用 jquery 移动设备
correctly reference jquery mobile locally
user3568918 已回复以下问题:
jQuery Mobile not working with Internet Explorer?
别忘了保留正确的绑定顺序:
- jquery 手机 css
- jquery 脚本
- jquery 移动脚本
我的问题是:
当我进入 jquery 手机的下载页面时
https://jquery手机.com/download/
我看到了两个可行的选择:
- 下载 javascript、css 和图片:
https://jquerymobile.com/resources/download/jquery.mobile-1.4.5.zip
- 下载缩小版 javascript :
http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js
如果我选择 1,则会创建两个额外的子文件夹 "demos" 和 "images",它们有自己的子文件夹。
我是否必须在 html 中引用所有这些子文件夹?
如果我选择 2,也就是只下载压缩后的 javascript,如何引用我想用于图标的图像?
非常感谢。
示例:假设您的 index.html
是根,您应该参考:
<link rel="stylesheet" href="css/jquery.mobile.1.4.5.min.css" />
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
那么,你服务器上的目录结构应该是这样的:
\index.html
-- All jQuery files shall be in \js subfolder and \css subfolder
\js\
----jquery-1.11.2.min.js
----jquery-1.11.2.min.map
----jquery.mobile-1.4.5.min.js
----jquery.mobile-1.4.5.min.map
(...other stuff)
\css\
-----jquery.mobile-1.4.5.min.css
-----jquery.mobile.external-png-1.4.5.min.css
-----jquery.mobile.icons-1.4.5.min.css
-----jquery.mobile.inline-png-1.4.5.min.css
-----jquery.mobile.inline-svg-1.4.5.min.css
(...other stuff)
\css\images\
------------ajax-loader.gif
------------icons-18-black.png
------------icons-18-white.png
(...other stuff)
\css\images\icons-png\
----------------------action-black.png
----------------------action-white.png
(...a lot of other stuff)
\css\images\icons-svg\
----------------------action-black.svg
----------------------action-white.svg
(...a lot of other stuff)
编辑:
zip 文件中的 demos
和 images
子文件夹已经为您准备好了,如果您需要在本地站点上也提供 JQM 演示,还有一个自定义 css演示专用文件。
我认为这也将澄清您问题的某些方面:https://css-tricks.com/data-uris/
user3568918 已回复以下问题:
jQuery Mobile not working with Internet Explorer?
别忘了保留正确的绑定顺序:
- jquery 手机 css
- jquery 脚本
- jquery 移动脚本
我的问题是:
当我进入 jquery 手机的下载页面时 https://jquery手机.com/download/ 我看到了两个可行的选择:
- 下载 javascript、css 和图片:
https://jquerymobile.com/resources/download/jquery.mobile-1.4.5.zip
- 下载缩小版 javascript :
http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js
如果我选择 1,则会创建两个额外的子文件夹 "demos" 和 "images",它们有自己的子文件夹。 我是否必须在 html 中引用所有这些子文件夹?
如果我选择 2,也就是只下载压缩后的 javascript,如何引用我想用于图标的图像?
非常感谢。
示例:假设您的 index.html
是根,您应该参考:
<link rel="stylesheet" href="css/jquery.mobile.1.4.5.min.css" />
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
那么,你服务器上的目录结构应该是这样的:
\index.html
-- All jQuery files shall be in \js subfolder and \css subfolder
\js\
----jquery-1.11.2.min.js
----jquery-1.11.2.min.map
----jquery.mobile-1.4.5.min.js
----jquery.mobile-1.4.5.min.map
(...other stuff)
\css\
-----jquery.mobile-1.4.5.min.css
-----jquery.mobile.external-png-1.4.5.min.css
-----jquery.mobile.icons-1.4.5.min.css
-----jquery.mobile.inline-png-1.4.5.min.css
-----jquery.mobile.inline-svg-1.4.5.min.css
(...other stuff)
\css\images\
------------ajax-loader.gif
------------icons-18-black.png
------------icons-18-white.png
(...other stuff)
\css\images\icons-png\
----------------------action-black.png
----------------------action-white.png
(...a lot of other stuff)
\css\images\icons-svg\
----------------------action-black.svg
----------------------action-white.svg
(...a lot of other stuff)
编辑:
zip 文件中的 demos
和 images
子文件夹已经为您准备好了,如果您需要在本地站点上也提供 JQM 演示,还有一个自定义 css演示专用文件。
我认为这也将澄清您问题的某些方面:https://css-tricks.com/data-uris/