Tsallaka zuwa abun ciki
Justice Tech School

Siblings

siblings, next, prev, nextAll and prevUntil move sideways between elements with the same parent.

Example
$('h2').next();
$('li.active').siblings().removeClass('active');

Exercise

Next element.

$('h2').()

Quiz Test

Which gets the previous element?

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