Hacker News new | ask | show | jobs
by iampivot 1325 days ago
Assume JS is needed in order for the slide checkboxes to be slidable.
4 comments

Funny you mention that, because hidden check boxes and radio inputs are often used creatively (in a kind of horrifying way) to store app state and avoid using JavaScript entirely, while still having complex animations. For instance, you can make a fully functional image gallery carousel with controls to navigate between each image with zero JavaScript like this, and this is just one of the simplest examples.
Why assume? You can copy-paste the code and see how it works.

Most pure CSS checkboxes make heavy use of pseudo-classes and pseudo-elements - but it is very possible to make these sliders without JS!

No JS, all made with pure CSS :D (you can copy the code to see how it works)
CSS transitions behind the scenes.