Skip to content

Challenge Target a Specific Child of an Element Using jQuery

SaintPeter edited this page · 1 revision
Clone this wiki locally

Target a Specific Child of an Element Using jQuery

jQuery uses CSS Selectors to target elements. target:nth-child(n) css selector allows you to select all the nth element with the target class or element type.

Here's how you would give the third element in each well bounce: $(".target:nth-child(3)").addClass("animated bounce");

$(".btn:nth-child(2)").addClass("animated bounce");

Something went wrong with that request. Please try again.