You can do this with jQuery's .attr
function, which will set attributes. Removing them is done via the .removeAttr
function.
//.attr()
$("element").attr("id", "newId");
$("element").attr("disabled", true);
//.removeAttr()
$("element").removeAttr("id");
$("element").removeAttr("disabled");