gpt4 book ai didi

javascript - 在 jQuery Mobile 网站中,可以将 jQuery 和 jQuery Mobile 库放在底部吗?

转载 作者:行者123 更新时间:2023-11-30 06:45:23 25 4
gpt4 key购买 nike

在 jquery 移动网站中有 3 件事要添加。

1个CSS文件

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css" />

JQuery 库

<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>

jQuery 移动库

<script src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js"></script>

我的问题是,之前在底部使用 js 库是否可以。因为它会提高加载速度。 jQuery 通过 javascript 类添加 css

最佳答案

只要主体不需要使用库,把你的js库放在最下面就可以了。事实上,这是一种常见的做法,这样主体就可以开始使用了,而不是使用 $(document).ready( function () {/* code */) );.

关于javascript - 在 jQuery Mobile 网站中,可以将 jQuery 和 jQuery Mobile 库放在底部吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7384997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com