Simple classList manipulation

Clicking the buttons below will toggle the class on the bacon ipsum text below, assigning the class with the same name (styles seen below). This is done using the new classList API.

Not supported :(

<style> 
  .big { font-size: 30px; }
  .bold { font-weight: bold; }
  .pink { background: #FF5E99; color: #fff; }
</style>

Bacon ipsum dolor sit amet pancetta bresaola tenderloin, swine meatball tongue ham boudin t-bone ribeye jerky sausage. Pork loin cow shankle drumstick tri-tip, chicken venison strip steak.

Toggle a class:

HTML5 Powered with Connectivity / Realtime, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage
Fork me on GitHub