You can add attributes using attr like below:
$('#yourid').attr('name', 'value');
To remove:
$('#yourid').removeAttr('name');
However, for DOM properties like checked, disabled and readonly, the proper way to do this (as of JQuery 1.6) is to use prop.
$('#yourid').prop('name', 'value');
To remove:
$('#yourid').removeProp('name');
What do you think?