HTML and CSS Reference
ations within web browsers.
lecting elements within the document (the internal representation of a document inside the
browser is referred to as the Document Object Model), manipulating these elements, or re-
through the Document Object Model API, which is also included in the HTML5 specific-
ation. jQuery essentially provides an elegant wrapper around the Document Object Model
The heart of jQuery is a selector engine. jQuery accepts selection criteria based on CSS style
selectors, and returns a set of elements from the document that meet these criteria. Once a
set of elements has been selected, jQuery provides a wide array of functions to perform op-
erations on these elements, or to attach event listeners to them.
has become enormously popular for several reasons:
• It removes the pain of dealing with quirks between different browsers.
• It provides a rich and succinct syntax that is seen by most as a vast improvement over the
Document Object Model API.
• It is simple to write custom plugins for jQuery, and therefore it can be extended to meet
• There are a wide range of open source plugins available for jQuery, including a popular UI
toolkit called jQuery UI.
There are a number of competitors to jQuery such as Dojo and Prototype, but jQuery has
obtained a critical mass in the market place and is almost a de-facto standard for web applic-