--- id: bad87fee1348bd9aed108826 title: Target a Specific Child of an Element Using jQuery required: - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.0/animate.css' challengeType: 6 videoUrl: '' localeTitle: Apunta a un niño específico de un elemento usando jQuery --- ## Description
Ha visto por qué los atributos de identificación son tan convenientes para la selección de objetivos con los selectores jQuery. Pero no siempre tendrás tan buenos identificadores con los que trabajar. Afortunadamente, jQuery tiene algunos otros trucos para apuntar a los elementos correctos. jQuery utiliza los selectores de CSS para apuntar a los elementos. El selector de CSS target:nth-child(n) permite seleccionar todos los elementos nth con la clase de destino o el tipo de elemento. Así es como le darías al tercer elemento en cada pozo la clase de rebote: $(".target:nth-child(3)").addClass("animated bounce"); Haz que el segundo niño en cada uno de tus elementos de pozo rebote. Debes seleccionar los elementos de los hijos con la clase target .
## Instructions
## Tests
```yml tests: - text: El segundo elemento en sus elementos target debe rebotar. testString: 'assert($(".target:nth-child(2)").hasClass("animated") && $(".target:nth-child(2)").hasClass("bounce"), "The second element in your target elements should bounce.");' - text: Solo dos elementos deben rebotar. testString: 'assert($(".animated.bounce").length === 2, "Only two elements should bounce.");' - text: 'Debe utilizar el selector :nth-child() para modificar estos elementos.' testString: 'assert(code.match(/\:nth-child\(/g), "You should use the :nth-child() selector to modify these elements.");' - text: Solo use jQuery para agregar estas clases al elemento. testString: 'assert(code.match(/\$\(".target:nth-child\(2\)"\)/g) || code.match(/\$\(".target:nth-child\(2\)"\)/g) || code.match(/\$\(".target"\).filter\(":nth-child\(2\)"\)/g) || code.match(/\$\(".target"\).filter\(":nth-child\(2\)"\)/g), "Only use jQuery to add these classes to the element.");' ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

```
## Solution
```js // solution required ```