.prop()
que permite ajustar as propriedades dos elementos. Veja como você desabilitaria todos os botões: $("button").prop("disabled", true);
Desativar apenas o botão target1
. target1
.
testString: 'assert($("#target1") && $("#target1").prop("disabled") && code.match(/[""]disabled[""],( true|true)/g), "Disable your target1
button.");'
- text: Não desabilite nenhum outro botão.
testString: 'assert($("#target2") && !$("#target2").prop("disabled"), "Do not disable any other buttons.");'
- text: Use apenas o jQuery para adicionar essas classes ao elemento.
testString: 'assert(!code.match(/disabled[^<]*>/g), "Only use jQuery to add these classes to the element.");'
```