If you are a web developer, you surely must know how handy it is to dynamically change the class attribute on an element. The benefits this technique are quite a few: You leave any changes in the look and feel to the CSS You avoid having to loop lots of elements as you can allow CSS to do that job for you by assigning a class on a parent element You can trigger CSS transitions and avoid having to
![Hidden Gems of HTML5: classList – Mozilla Hacks - the Web developer blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/8f043099b608abf8384b24171faa177d3698e62e/height=288;version=1;width=512/https%3A%2F%2Fhacks.mozilla.org%2Fwp-content%2Fthemes%2FHax%2Fimg%2Fhacks-meta-image.jpg)