Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (5 sloc) 413 Bytes

Disable an Element Using jQuery

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

Something went wrong with that request. Please try again.