What is jQuery | jQuery CDN

What is jQuery? | jQuery CDN

jQuery is a JavaScript library it is lightweight and very easy to use in web pages. Its slogan is “write less, do more”. It allows you to use JavaScript with easy and more control in your websites.
jQuery allows you to get work done with a single line of code while JavaScript may require a huge function to complete that task.

Ajax call and DOM manipulation is much easier with jQuery compared to JavaScript

These are the key features of jQuery library:
• HTML event methods
• Effects and animations
• HTML and DOM manipulation
• CSS manipulations
• AJAX calls
• Utilities

How to add jQuery to Web Pages

To add Jquery to your projects you can simply download Jquery file from jQuery.com or use CDN (Content Delivery Network)

How to download jQuery Library

JQuery Library is available in two versions:
• Development version – it is used for testing and development (uncompressed and easily readable JQuery code)
• Production version – it is used for live website because it has been minified and compressed and hard to read an modify

jQuery has a single .js file to include into the web pages using HTML tags. Most appropriate and recommended place to include the jQuery file is the section of web page.

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

jQuery CDN

One can include jQuery file from a CDN (Content Delivery Network) if you don’t desire to download and host the file. There are two big names Google and Microsoft that have the jQuery CDN to include in your web pages.
To use jQuery from Google or Microsoft, use one of the following:
To include jQuery CDN or from CDN here is the code and Google jQuery CDN URL:

<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

Microsoft Jquery CDN URL:

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

Comments