--- id: bad87fee1348bd9aed808826 title: Disable an Element Using jQuery challengeType: 6 --- ## Description
You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons. When you disable a button, it will become grayed-out and can no longer be clicked. jQuery has a function called .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.
## Instructions
## Tests
```yml tests: - text: Disable your 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.'); ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

```
## Solution
```html

jQuery Playground

#left-well

#right-well

```