We don't have to limit ourselves to selecting HTML elements like
<div>; essentially, we can put any CSS selector in quotes and pass it into
$(). This means we can select classes, too!
Recall that we can select classes in CSS by using a dot (
.). If we have
class="red" in our HTML, we can target it in CSS with
.red. In jQuery, all we need to do is put
'.red' in quotes, and we can pass it to
$() to make a jQuery object.