The jQuery library provides a general-purpose abstraction layer for common web scripting, and is therefore useful in almost every scripting situation.
The following points that jquery does.Without a JavaScript library, many lines of code must be written to traverse the Document Object Model (DOM) tree, and locate specific portions of an HTML document's structure.
CSS offers a powerful method of influencing the way a document is rendered; but it falls short when web browsers do not all support the same standards. jQuery can bridge this gap, providing the same standards support across all browsers.
Not limited to mere cosmetic changes, jQuery can modify the content of a document itself with a few keystrokes. Text can be changed, images can be inserted or swapped.
Even the most elaborate and powerful behaviors are not useful if we can't control when they take place. The jQuery library offers an elegant way to intercept a wide variety of events, such as a user clicking on a link.
To effectively implement such interactive behaviors, a designer must also provide visual feedback to the user.
This code pattern has become known as Asynchronous JavaScript and XML (AJAX), and assists web developers in crafting a responsive, feature-rich site.
Document specific features of jQuery, the library provides enhancements to basic JavaScript constructs such as iteration and array manipulation.
$("p").hide() The jQuery hide() function, hiding all <p> elements. $("this").hide() The jQuery hide() function, hiding current(this) element. $("#div1").hide() The jQuery hide() function, hiding whose id="div1" in the elements. $(".div1").hide()The jQuery hide() function, hiding whose class=".div1" in the elements.