JQuery installation

Do you know 2021-10-13 21:31:06
jquery installation


In this section, we learn jQuery Installation , We are in the actual project , If you want to use jQuery, You need to download jQuery library , Then introduce it into the web page to be used .

jQuery There are several ways to use :

  • Download from official website jQuery library , Then introduce it into the page .
  • Install with command jQuery, for example npmbower command .
  • from CDN In the load jQuery, For instance from Google Load in jQuery.

jQuery download

We Can be in jQuery Download on jQuery, Download at :https://jquery.com/download/.

There are two versions jQuery Available for download :

  • Production version : Used in actual websites , Has been reduced and compressed .
  • Development version : For testing and development , non-compressed , Is readable code .

We download the corresponding version as needed , For example, I downloaded jquery-3.5.1.min.js file , Then you can put the downloaded files in the same directory as the web page , This is more convenient to use .

Then you can introduce... Into the page jquery Documents , The import format is as follows :

<script src="jquery-3.5.1.min.js"></script>

Use npm install jQuery

jQuery stay npm Register as a package on , So we can use it npm CLI Command to install the latest version of jQuery

npm install jquery

Or use Yarn Command installation can also :

yarn add jquery

Use these two methods to install jQuery, We can do it in node_modules/jquery/dist/ Found an uncompressed distribution in , A compressed distribution and a mapping file .

Use Bower install jQuery

except npm,jQuery And through Bower Register as package , So we can also use bower Command to install the latest version of jQuery

bower install jquery

In this way , Will jQuery The installation to Bower Installation directory , The default is bower_components. We can do it in bower_components/jquery/dist/ An uncompressed distribution was found in the directory , A compressed distribution and a mapping file .

take jQuery And CDN Use it together

If we don't want to download and store jQuery Words , We can also from CDN( Content distribution network ) Quote it .

CDN It is an intelligent virtual network based on the existing network , Rely on edge servers deployed everywhere , Load balancing through the central platform 、 content distribution 、 Scheduling and other functional modules , Let users get the content they need nearby , Reduce network congestion , Improve user access response speed and hit rate .

For example, both Google and Microsoft servers have jQuery, If we need to quote , It can be like this :

  • Google quote jQuery

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  • Microsoft quote jQuery

    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.min.js"></script>

summary

We talked about jQuery There are several ways to install , In the following learning chapters , We will download directly on the official website jQuery library , Then use... By referencing in the page jQuery .

版权声明
本文为[Do you know]所创,转载请带上原文链接,感谢
https://qdmana.com/2021/10/20211001222637332s.html

  1. 为什么说 Node.js 是实时应用程序开发的绝佳选择
  2. PaddlePaddle:在 Serverless 架构上十几行代码实现 OCR 能力
  3. 使用elementui在完成项目中遇到的未知知识点2
  4. On the mechanism of webpack loader
  5. 云原生体系下 Serverless 弹性探索与实践
  6. vue开发技巧
  7. Une fleur merveilleuse de l'histoire de l'industrie des nouveaux véhicules énergétiques, Zhongtai Jiangnan T11, une voiture vintage que vous n'avez jamais vue
  8. 致敬!再见了!LayUI !
  9. Vue安装和卸载
  10. Implement a flipped character with the transform attribute of CSS
  11. 你的第一个 Docker + React + Express 全栈应用
  12. [apprentissage de l'algorithme] 1486. Fonctionnement exclusif du tableau (Java / C / C + + / python / go / Rust)
  13. Zhang Daxian sends a blessing video on xYG relay, showing positive energy in details
  14. 前端技巧-JS元编程ES6 symbol公开符号
  15. Article de 37 ans seul à l'hôpital!Il boitait, soupçonnait d'être blessé, souriait avec douleur
  16. 前端推荐!10分钟带你了解Konva运行原理
  17. npm ERR! iview-project@3.0.0 init: `webpack --progress --config webpack.dev.config.js
  18. 零基础学习Web前端需要注意什么呢?
  19. The Youth League promotes Yiyang Qianxi new film, and the relationship between the two generation and the generation is good. Li Fei is blessed.
  20. PaddlePaddle:在 Serverless 架构上十几行代码实现 OCR 能力
  21. JavaScript数组 几个常用方法
  22. Qu'est - ce qu'il faut remarquer à l'avant - plan Web de l'apprentissage de base zéro?
  23. 暢談this的四種綁定方式
  24. 2021最新Vue面试必胜宝典,大厂面试题解析!
  25. Quatre façons de lier ceci
  26. Préparation au développement de l'extension tagdown
  27. Intervieweur: Parlez - moi des flotteurs CSS
  28. Packaging the View Component Library with rollup
  29. Comment un composant enfant modifie les valeurs passées par le composant parent
  30. Résumé de l'API Express
  31. Optimisation de la structure du Code if else dans le projet
  32. Fonction magique pour résoudre le problème de la fonction maybe - - fonction either
  33. 新手学前端的方法是什么 自学前端该怎么规划
  34. 云原生体系下 Serverless 弹性探索与实践
  35. 如何全方位打造安全高效的HTTPS站点(一)
  36. "Liu Jing dit che 丨 point de vue" est - ce que Custom Road est un MpV digne de la terre?
  37. 从理念到LRU算法实现,起底未来React异步开发方式
  38. Compared with Volvo XC60, Lingke 09 goes out of the spa platform. What would you choose, regardless of the brand?
  39. PaddlePaddle:在 Serverless 架构上十几行代码实现 OCR 能力
  40. 云原生体系下 Serverless 弹性探索与实践
  41. 初学者怎么学Web前端?
  42. react
  43. PaddlePaddle:在 Serverless 架构上十几行代码实现 OCR 能力
  44. JavaScript数组 几个常用方法
  45. Angular 依赖注入 - 全面解析
  46. html_day02
  47. 那些年我们前端面试中经常被问到的题!
  48. The starting price of Ducati multistada V2 in North America is less than 100000 yuan
  49. Hls.js 使用文檔
  50. Hls.js travailler avec des documents
  51. Problèmes liés à la précision JS
  52. Copie une partie des propriétés d'un objet à un autre objet
  53. Multiplexage de modules en vuex
  54. Développement multilingue Android, questions d'entrevue pour le développement de logiciels Android
  55. Chen lushai and her best friend Wang Meng play video, fearless of the pressure of public opinion, and in a good mood to dance in a bare back
  56. # Sass速通(四):继承、混合与函数
  57. Vidéo de développement de combat Android, questions d'entrevue rxjava
  58. Bugatti Chiron maintenance cost exposure! One piece for one car, burn money endlessly
  59. android应用开发基础答案,深入理解Nginx
  60. 做了三年前端,你才知道10分钟就能实现一个PC版魔方游戏