Skip to content
Justice Tech School

Filter Selectors

jQuery adds filters such as :first, :even, :odd, :visible and :hidden. Prefer methods like .first() and .filter() for speed.

Example
$('li:first');
$('tr:even');
$(':input');
$('li').first();
$('li').eq(2);

Exercise

First element.

$('li').()

Quiz Test

Which gets the third element?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.