Javascript - JQuery

> (World Wide) Web - (W3|WWW) > Javascript (Js|ECMAScript)

1 - About

Jquery is a javascript library that principally implements higher function of the DOM API in order to manipulate HTML page.

As it offers a plugin framework, it's also a great place to share Javascript knowledge.

All jquery example are in the dom section.

Although browsers have built-in APIs for manipulating the DOM, these interfaces are verbose and cumbersome, likely due to standards bodies’ emphasis on unambiguous designs that can be implemented consistently by vendors and survive future revision. As a result, JavaScript libraries that enable more convenient manipulation are hugely popular. Of these, jQuery, is so successful it is often considered synonymous with JavaScript among novices. These libraries share the concept of a selection: identify a set of elements using simple predicates, then apply a series of operators that mutate the selected elements.
Advertising

3 - Entry point

The jQuery library exposes its methods and properties via two properties of the window object called:

  • jQuery and
  • $ ($ is a shorter alias for jQuery)

if ("jQuery" in window) {
    console.log("Jquery is a property of Window");
} 
if ("$" in window) {
    console.log("$ is a property of Window");
}

4 - Operations

5 - Library

Advertising

6 - Variable

To make it clear that a variable contains an instance of the jQuery object, variables are prefixed by a $ character:

var $obj = jQuery('#some__id');

where:

7 - Documentation / Reference

web/javascript/jquery.txt · Last modified: 2019/03/19 22:41 by gerardnico