<sectionid="description"> También puede apuntar elementos por sus atributos de identificación. Primero apunte su elemento de <code>button</code> con el id <code>target3</code> usando el selector <code>$("#target3")</code> . Tenga en cuenta que, al igual que con las declaraciones de CSS, escribe un <code>#</code> antes del nombre del ID. Luego use la función <code>.addClass()</code> jQuery para agregar las clases <code>animated</code> y <code>fadeOut</code> . Así es como harías que el elemento del <code>button</code> con el id <code>target6</code> desvanezca: <code>$("#target6").addClass("animated fadeOut")</code> . </section>
- text: Seleccione el elemento de <code>button</code> con el <code>id</code> de <code>target3</code> y use la función jQuery <code>addClass()</code> para darle la clase de <code>animated</code> .
testString: 'assert($("#target3").hasClass("animated"), "Select the <code>button</code> element with the <code>id</code> of <code>target3</code> and use the jQuery <code>addClass()</code> function to give it the class of <code>animated</code>.");'
- text: <code>target3</code> al elemento con el id <code>target3</code> y usa la función jQuery <code>addClass()</code> para darle a la clase <code>fadeOut</code> .
testString: 'assert(($("#target3").hasClass("fadeOut") || $("#target3").hasClass("fadeout")) && code.match(/\$\(\s*.#target3.\s*\)/g), "Target the element with the id <code>target3</code> and use the jQuery <code>addClass()</code> function to give it the class <code>fadeOut</code>.");'
- 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.");'