3 ms·
Assume JS is needed in order for the slide checkboxes to be slidable.
by iampivot 4y ago
Assume JS is needed in order for the slide checkboxes to be slidable.
- speps 4y agoCSS transitions behind the scenes.
- guivr 4y agoNo JS, all made with pure CSS :D (you can copy the code to see how it works)
- candu 4y agoWhy 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!
- Raicuparta 4y agoFunny 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.