Hacker News new | ask | show | jobs
by simonw 1798 days ago
Yes that would work great.

Usually for things like that I'll come up with a CSS class that means "set it up so this element has its class toggled based on the state if the checkbox it contains". Sometimes I'll use data- attributes for additional configuration.