jQuery: .eq()

The .eq() method reduces the set of matched elements to the one at the specified index.

The supplied index identifies the position of this element in the set.

<!doctype html>
    <title>eq demo</title>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
        div {
            width: 60px;
            height: 60px;
            margin: 10px;
            float: left;
            border: 2px solid blue;

        .blue {
            background: blue;




Try The Code

In the example above, the supplied index is 2.

Series Navigation<< jQuery: Other common traversing methods
jQuery: .filter() >>