$().attr('id','') still leaves id = "" snippet,
$().attr('id',''
id = ""
how to completely remove it?
Use the removeAttr method.
removeAttr
$('selector').removeAttr('id')