I want to disable input id of buttons in java script. My code:
var uniqid = "idModify_" + index;
var buttonModify = $('<input type="button"/>');
buttonModify.attr('id', uniqid);
li.append(buttonModify);
buttonModify.button();
if (my required condition is true)) {
$("#uniqid").attr("disabled", "disabled").addClass("disabled");
}
I have tried $(uniqid ).prop('disabled', true);
it does not work.
Note: index value will be 0 to n every time the button gets added to li.
$("#"+uniqid).attr("disab...