What is Jquery?
What is JQuery? What is it used for?
JQuery is simply a JavaScript library. It aims to make the tasks we can do by writing long codes with JavaScript shorter and more practical. Learning and using jQuery is extremely easy for people who know some Html, CSS and JavaScript. Even those who do not know JavaScript at all can easily use JQuery. JQuery contains many methods within itself, and we can add visual effects and interactivity to our page by applying these methods to the HTML elements we want, whenever we want. Although there are other JavaScript libraries used on the web other than JQuery, the most popular is JQuery. Giant companies such as Microsoft and Google also support JQuery. Another advantage is that it works in almost all versions of today's browsers.
To use JQuery, all we need to do is link the single-page .js file containing the JQuery library to your pages.
We can do this in two ways.
We download the file, place it on our site and link it to our page as follows:
< script src="jquery-1.11.3.min.js" >< /script >
Without the need to download the file, we can connect via one of the CDN (Content Delivery Network) provided by Google or Microsoft. Below is how the JQuery connection is made via Google and Microsoft servers. One of the following lines is sufficient:
< script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous" >< /script >
Although it may seem more logical at first to download JQuery and host it on your own site, connecting via CDN will also have the following advantage: Since JQuery is now used in many requests and most of these sites use this file via CDN, it will be stored in the browser cache of visitors to our site. The JQuery library will be ready, which will speed up the loading of our page.
You can visit the following address to check and download the latest JQuery version or learn the CDN link.