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
. 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.");'
```