What is jQuery?
jQuery is a fast, functional, multi-functional JavaScript library created by John Resig in 2006 with a meaningful motto: Write less, do more - Write less, do more .
jQuery simplifies HTML document browsing, event handling, animation and Ajax interaction for fast web development. Web analytics has shown that jQuery is the most widely deployed JavaScript library.
jQuery is a set of JavaScript tools designed to simplify different tasks by writing less code. The following lists some of the most important features supported by jQuery:
- Manipulating the DOM - jQuery makes it easy to select DOM elements to traverse (browse) as easily as using CSS, and edit their content by using the open source Selector media, which is called Sizzle .
- Event handling - jQuery helps to interact with users better by handling diverse events without making HTML code messy with Event Handler.
- AJAX support - jQuery helps you a lot to develop a feature-rich and responsive site using AJAX technology.
- Animated effects - jQuery comes with a lot of beautiful animation effects that you can use for your websites.
- Compact - jQuery is a lightweight library - it is only about 19KB (gzipped).
- Most supported by modern browsers - jQuery is supported mostly by modern browsers, and works well on IE 6.0+, FF 2.0+, Safari 3.0+, Chrome and Opera 9.0+.
- Update and support the latest technologies - jQuery supports CSS3 Selector and basic XPath syntax.
How to use jQuery?
There are two ways to use jQuery:
Local installation - You can download the jQuery Library on your computer and include it in the HTML code.
Using from CDN (CDN Based Version) - You can put jQuery library into HTML code directly from the Content Delivery Network (CDN).
Install jQuery internally
Visit https://jquery.com/download/ to download the latest version of jQuery. Now put jquery-2.1.3.min.js file into a folder in your Website, for example / jquery .
Now you can include the jquery library in your HTML file as follows:
The jQuery Example