Replace one or more classes on an element