button
com o id target3
usando o seletor $("#target3")
. Note que, assim como com as declarações CSS, você digita um #
antes do nome do id. Em seguida, use a função .addClass()
do jQuery para adicionar as classes animated
e fadeOut
. Aqui está como você faria o elemento button
com o id target6
fade out: $("#target6").addClass("animated fadeOut")
. button
com o id
de target3
e use a função jQuery addClass()
para dar a classe 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: Segmente o elemento com o id target3
e use a função jQuery addClass()
para dar a classe 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: Use apenas o jQuery para adicionar essas classes ao elemento.
testString: 'assert(!code.match(/class.*animated/g), "Only use jQuery to add these classes to the element.");'
```