.prop()
that allows you to adjust the properties of elements.
Here's how you would disable all buttons:
$("button").prop("disabled", true);
Disable only the target1
button.
target1
button.
testString: assert($("#target1") && $("#target1").prop("disabled") && code.match(/["']disabled["'],( true|true)/g), 'Disable your target1
button.');
- text: Do not disable any other buttons.
testString: assert($("#target2") && !$("#target2").prop("disabled"), 'Do not disable any other buttons.');
- text: Only use jQuery to add these classes to the element.
testString: assert(!code.match(/disabled[^<]*>/g), 'Only use jQuery to add these classes to the element.');
```