Changed .id="" to .removeAttribute("id")