button
con el id target3
usando el selector $("#target3")
. Tenga en cuenta que, al igual que con las declaraciones de CSS, escribe un #
antes del nombre del ID. Luego use la función .addClass()
jQuery para agregar las clases animated
y fadeOut
. Así es como harías que el elemento del button
con el id target6
desvanezca: $("#target6").addClass("animated fadeOut")
. button
con el id
de target3
y use la función jQuery addClass()
para darle la clase de animated
.
testString: 'assert($("#target3").hasClass("animated"), "Select the button
element with the id
of target3
and use the jQuery addClass()
function to give it the class of animated
.");'
- text: target3
al elemento con el id target3
y usa la función jQuery addClass()
para darle a la clase fadeOut
.
testString: 'assert(($("#target3").hasClass("fadeOut") || $("#target3").hasClass("fadeout")) && code.match(/\$\(\s*.#target3.\s*\)/g), "Target the element with the id target3
and use the jQuery addClass()
function to give it the class fadeOut
.");'
- text: Solo use jQuery para agregar estas clases al elemento.
testString: 'assert(!code.match(/class.*animated/g), "Only use jQuery to add these classes to the element.");'
```