DEV Community

Discussion on: Simple Filters in CSS or JS

Collapse
 
sirpilan profile image
sirpilan

Nice one, there actually is a trick to get a persistent state without JS: Have a look here:
stackoverflow.com/questions/630047...
"Without JS - height transition".

Basically you use a input checkbox - then use input:checked in css to filter. By doing this, you will be able to filter persistently and combine filters aswell.

Collapse
 
dhintz89 profile image
Daniel Hintz

Ooohh clever, I like it! I'll try to implement that approach in this example in the next week or two and add it in (and give you a shoutout, of course 😉). Thanks for sharing!