how to limit the add()'ing of a class to a single element - so when one is added, another is removed if it exists

how to limit the add()'ing of a class to a single element - so when one is added, another is removed if it exists

I have a series of elements that I want to animate to give them focus by clicking and I currently am doing it through a toggle animate function. I was going to switch to adding a ".selected" class but what I need help with here is to remove the selected from the element when a new one has become freshly ".selected". Is there a good way to do this?