Getting Started with jQuery


To get started with jQuery, you can either download the jQuery library and host it on your server or use a Content Delivery Network (CDN) to include it in your project. Here are the steps to download the jquery.min.js file and include it in your HTML file:

Step 1 : Visit the jQuery Official Website:

Go to the official jQuery website at https://jquery.com/.

jQuery

Step 2 : Download jQuery:

On the jQuery website, click on the "Download" tab.

jQuery Download

Choose the version you want to download. You can select the latest version or a specific version if needed.

Choose version

You can download either the compressed (minified) version or the uncompressed version. For most production use, it's recommended to use the minified version (jquery.min.js) as it is smaller in size.

Click on the "Download" button to download the selected version. save the js file in your working path.

Js File

Include jQuery in Your Project:

Once you have downloaded the jquery.min.js file, include it in your HTML file using the <script> tag. You can either host it on your server or use a CDN.

Hosted on Your Server:

Place the downloaded jquery.min.js file in your project directory and reference it in your HTML file like this:

<script src="path/to/jquery.min.js"></script>

Using CDN:

Alternatively, you can use a CDN link to include jQuery directly from a content delivery network.

  • serach jquery CDN download, Go to the official jQuery website at jQuery CDN
  • Choose the version you want to download and click the version for download
  • Minified version
    CDN Link

  • Copy the link, This can be done by adding the following line in the <head> section of your HTML file:
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>

Verify Installation:

To ensure that jQuery is correctly included, you can add a simple script to your HTML file:

<script>
    $(document).ready(function() {
        alert("Success : Welcome to Learn jQuery...");
    });
</script>

This script displays an alert when the document is fully loaded, confirming that jQuery is properly included.

By following these steps, you can download the jquery.min.js file and integrate jQuery into your web development project.