Find out which class the element was identified by
<p>I'm making a small fluid grid system for a website, which will have classes .g1 to .g5. </p>

<p>I want to take all elements with one of those classes, remove only that class, wrap them in a container, and then add the class which was removed to the new container. Problem is, I have no idea how to find out by what class the element was identified, and add the same one to the container.</p>

<p>I'm doing this to be able to add fixed margin between elements.</p>
