My page creates multiple buttons as id = \'rbutton_\"+i+\"\'
. Below is my code:
There are two things here, and the highest voted answer is technically correct as per the OPs question.
Briefly summarized as:
$("some sort of selector").prop("disabled", true | false);
However should you be using jQuery UI (I know the OP wasn't but some people arriving here might be) then while this will disable the buttons click event it wont make the button appear disabled as per the UI styling.
If you are using a jQuery UI styled button then it should be enabled / disabled via:
$("some sort of selector").button("enable" | "disable");
http://api.jqueryui.com/button/#method-disable