You need to include a jQuery JS file in your web page to start working with jQuery. There are two ways to use jQuery file on your web page, either you can download it from the official jQuery website, or you can link directly using CDN services.
How to Use jQuery
- Download latest jQuery file from the official jQuery website.
- Use jQuery directly from free CDN services like jQuery CDN, Google Hosted Libraries, etc.
jQuery Download File
- Compressed and uncompressed copies of jQuery files are available to download; you can download production compressed version; if you don't want to edit it later.
- To use jQuery by using the downloaded file, you need to add jQuery js file to your webpage by using HTML <script> tag.
jQuery already hosted on CDN so you can use it directly without downloading, and it also best if you want to save your bandwidth by using CDN services.