No. I dislike JavaScript. Because it bloats pages, slowdowns page loading and you always need libraries to do the smallest thing.
I try to avoid JavaScript as much as possible. There is some on this page to flip the screenshots and that annoyed me.
You should be able to do something with labels, CSS sibling selectors, and the :checked pseudo-class if it matters to you. I found an example at https://codepen.io/ancaspatariu/pen/WpQYOP which does quite a lot more than you’d need.