Skip to content
Justice Tech School

find versus children

find searches all descendants and children only direct ones. Use find with a selector to scope searches inside a component.

Example
const $card = $('.card');
$card.find('.title');
$card.children('.body');

Exercise

Search all descendants.

$card.('.title')

Quiz Test

Which searches deeper?

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