Easy Tutorial
❮ Eff Delay Sel Has ❯

jQuery.each() Method

jQuery Miscellaneous Methods

Example

Iterate over array elements

$(function () { 
    $.each([52, 97], function(index, value) {
        alert(index + ': ' + value);
    });
})

Definition and Usage

The jQuery.each() function is used to traverse specified objects and arrays.


Syntax

Parameter Description
object Object type, specifies the object or array to be traversed.
callback Function type, specifies the function to be executed in the loop.

More Examples

Iterate over an object

Iterate over an array

Iterate over an array

Iterate over an element


jQuery Miscellaneous Methods

❮ Eff Delay Sel Has ❯