A little plain JavaScript goes a long way
Julia Evans recently described how she implemented nearly an entire UI by simply adding and removing CSS classes, relying on CSS transitions when she wanted to animate a change. Her approach highlights a broader pattern in frontend development: much of the JavaScript on sites that aren’t fully built from JavaScript boils down to “click the thing, toggle the class.”
That pattern helps explain why jQuery was so effective in its heyday and why lightweight libraries like Alpine.js have found a happy audience among developers who want small, declarative interactivity without a heavyweight framework.
The concept isn’t new. A popular screencast from CSS-Tricks, titled “Hey designers, if you only know one thing about JavaScript, this is what I would recommend,” makes the same case: learning to toggle classes is an empowering first step into the language. As the screencast puts it, JavaScript may be huge and complex, but you can baby-step into it by learning something small and simple.
This is the thing I want you to learn: when you click on some element, change a class on some element.
It’s a minimal skill with outsized return—enough to drive menus, modals, tabs, and card flips without pulling in a larger library, and a solid foundation for learning more.



