Writing out class names on page load works. The function for button clicks does not, but whatever.