What is jQuery

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.

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 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

  • Easy to learn: jQuery is easy to learn because it supports same JavaScript style coding.
  • Write less do more: jQuery provides a rich set of features that increase developers' productivity by writing less and readable code.
  • Excellent API Documentation: jQuery provides excellent online API documentation.
  • Cross-browser support: jQuery provides excellent cross-browser support without writing extra code.
  • 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.

Want to check how much you know jQuery?