--- id: bad87fee1348bd9aed808826 title: Disable an Element Using jQuery challengeType: 6 videoUrl: '' localeTitle: Deshabilitar un elemento usando jQuery --- ## Description
También puede cambiar las propiedades no CSS de elementos HTML con jQuery. Por ejemplo, puede deshabilitar botones. Cuando desactivas un botón, se vuelve de color gris y ya no se puede hacer clic en él. jQuery tiene una función llamada .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 .
## Instructions
## Tests
```yml tests: - text: Desactiva tu botón 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.");' ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

```
## Solution
```js // solution required ```