.prop()
que le permite ajustar las propiedades de los elementos. A continuación le indicamos cómo deshabilitaría todos los botones: $("button").prop("disabled", true);
Deshabilita solo el botón target1
. target1
.
testString: 'assert($("#target1") && $("#target1").prop("disabled") && code.match(/[""]disabled[""],( true|true)/g), "Disable your target1
button.");'
- text: No deshabilite ningún otro botón.
testString: 'assert($("#target2") && !$("#target2").prop("disabled"), "Do not disable any other buttons.");'
- text: Solo use jQuery para agregar estas clases al elemento.
testString: 'assert(!code.match(/disabled[^<]*>/g), "Only use jQuery to add these classes to the element.");'
```