$( .disable key ).attr( class action key ) example Example: jquery disable button function disable(i){ $("#rbutton_"+i).prop("disabled",true); }