Now I know this basic question has been asked before, but I must be doing something wrong. I know that an appended element must bound before I can do anything to it. However
you could use replaceAll instead of remove and append replaceAll