What is jQuery

jQuery is a fast, small and feature-rich JavaScript library included in a single .js file.

jQuery makes a web developer's life easy. It provides many built-in functions using which you can accomplish various tasks easily and quickly.

jQuery provides following important features:

DOM Selection: jQuery provides Selectors to retrieve DOM element based on different criteria like tag name, id, css class name, attribute name, value, nth child in hierarchy etc.

DOM Manipulation: You can manipulate DOM elements using various built-in jQuery functions. For example, adding or removing elements, modifying html content, css class etc.

Special Effects: You can apply special effects to DOM elements like show or hide elements, fade-in or fade-out of visibility, sliding effect, animation etc.

Events: jQuery library includes functions which are equivalent to DOM events like click, dblclick, mouseenter, mouseleave, blur, keyup, keydown etc. These functions automatically handle cross-browser issues.

Ajax: jQuery also includes easy to use AJAX functions to load data from servers without reloading whole page.

Cross-browser support: jQuery library automatically handles cross-browser issues, so the user does not have to worry about it. jQuery supports IE 6.0+, FF 2.0+, Safari 3.0+, Chrome and Opera 9.0+.

Advantages of jQuery:

  1. Easy to learn: jQuery is easy to learn because it supports same JavaScript style coding.
  2. Write less do more: jQuery provides a rich set of features that increase developers' productivity by writing less and readable code.
  3. Excellent API Documentation: jQuery provides excellent online API documentation.
  4. Cross-browser support: jQuery provides excellent cross-browser support without writing extra code.
  5. Unobtrusive: jQuery is unobtrusive which allows separation of concerns by separating html and jQuery code.

Learn how to download and install jQuery library in the next section.