if you want to 'add to the id' rather than replace it
capture the current id first, then append your new id. especially useful for twitter bootstrap which uses input states on their forms.
new_id = '{{old_id}} inputSuccess';
old_id = that.attr('id');
that.attr('id', new_id.replace( /{{old_id}}/ig,old_id));
if you do not - you will lose any properties you previous set.
hth,