Skip to content
Justice Tech School

Attribute and Form Selectors

Select by attributes with brackets and by form type with :text, :checked and :selected.

Example
$('input[type="text"]');
$('input:checked');
$('option:selected');
$('[data-id]');

Exercise

Checked boxes.

$('input:')

Quiz Test

Select elements with a data-id attribute?

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