To use JQuery, you need to download JQuery using the below:
With this method, you do not have to download the JQuery file to your local system. Rather you can link the JQuery file to your code and JQuery works just fine.
Cloudflare provides a CDN that you can use.
Below is the piece of code :
<html> <body> <script src = "https://cdnjs.cloudflare.com/ajax/libs/JQUERY/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { document.write("Hello World") }); </script> </body> </html>
All we have done is, included the JQuery file jquery.min.js from cloudflare.
<script src = "https://cdnjs.cloudflare.com/ajax/libs/JQUERY/3.3.1/jquery.min.js"> </script>
Below are the steps to download JQuery to your local system :
Let us write a Program that will print Hello World.
<html> <body> <script src = "JQuery-3.7.1.min.js""> </script> <script> $(document).ready(function () { document.write("Hello World") }); </script> </body> </html>