freeCodeCamp Challenge Guide: Disable an Element Using jQuery

freeCodeCamp Challenge Guide: Disable an Element Using jQuery
0.0 0

#1

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);

#2

Not so helpful.:neutral_face:


#3

I passed the lesson and you use: $("#target1").prop(“disabled”, true);


#4

Nice! I’m glad to read that you figured it out :slight_smile:


#5

Hey!

I’m glad you were able to figure it out!


#6


#8