Use .text() instead of .val(). It is not an input it should be a div or td For the edit button use the "ends with" selector and disabled should be disabled for a value not true: j$('[id$=edit]').attr('disabled','disabled'); or try j$('[id$=edit]').prop("disabled",true);