Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use JQuery to disable a submit button?

So that it's no longer clickable.

like image 251
TIMEX Avatar asked Dec 13 '22 22:12

TIMEX


2 Answers

Set the disabled attribute.

$("#buttonID").attr("disabled", "disabled");

like image 125
Jess Avatar answered Dec 15 '22 11:12

Jess


Shouldn't that be

$("#buttonID").attr("disabled", true);

?

like image 45
Jimmy McCarthy Avatar answered Dec 15 '22 11:12

Jimmy McCarthy