BTW- This method can be applied to any css property.
<script>
$(function() {
$("div.variant-width").each(function() {
var myclass = $(this).text();
var mytarget = $(this).parent();
switch (myclass) {
case "big":
mytarget.css("width", "50%");
break;
case "mid":
mytarget.css("width", "33.33333%");
break;
case "small":
mytarget.css("width", "25%");
break;
default:
break;
}
});
});
</script>
When your bath soap bar gets too small to use, don't throw it away! open the next bar, and when you finish showering, stick the small old bar to the back of the new bar. Onces they both dry, they will become one.