Basics

Loading...

Overview

xxx.

Document Ready

.ready()

$( handler ) $( document ).ready( handler )

Traversing

Shared HTML

Some of these results have been altered by the jQuery experiments from the Traversing section.

.each()

elementSet.each( function(index, element){ } ) // this => element

Iterates over a set of elements and executes a function for each one.

Note: Most jQuery methods, that return a collection, can implicitly loop through it, making the .each() method unnecessary, as shown in the following example.

.filter()

elementSet.filter( selector ) elementSet.filter( function(index, element){ } ) // this => element elementSet.filter( elements ) elementSet.filter( selection )

Reduces a set of elements to a new set that matches the given query.

Or, just use CSS.