In this jQuery tutorial, we are going to learn how to add jQuery to web pages. In the previous tutorial, we have seen the introduction of jQuery.
In this guide, we will see how to install jQuery on websites in different ways.
There are several ways to use jQuery in web pages, You can download jQuery from jquery.com or you can use CDN of jQuery like google, etc.
Headings of Contents
To use jQuery in web pages, you have to download jQuery. There are two versions of jQuery available for downloading.
Production version:- The production version of jQuery is available for a live website because it has been minified and compressed.
Development version:- The development version of jquery is available for the testing websites.
You can download both jQuery versions from the jQuery.com website.
<head> <script src="You jquery downloaded file path"></script> </head>
Note:- Place the downloaded file in the same directory where all the pages of the website are placed.
If you don’t want to download a jQuery file in your system, Then you have another option to use jQuery that is CDN. There are lots of companies host jQuery CDN on their server.
Let’s see some jQuery CDN.
Google jQuery CDN:
<head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head>
Cloudflare jQuery CDN:
<head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head>
In this tutorial, you have learned how to use jQuery on web pages. jQuery is the best option if you want to do more work in less time in your project.jQuery provides lots of facilities. In a later jQuery tutorial, we will see all the topics of jQuery.
I hope this article will help you. If you like this article, please comment and share it with your friends who want to learn jQuery from scratch to advanced.