Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Filtering tags? Reply To: Filtering tags?

#256613
bearhead
Participant

Here is a very simple example of how to show/hide divs based on data-* attributes (your “tags” essentially) with javascript:
https://codepen.io/kvana/pen/LLJmZb

If you want animation, you’ll have to add/remove classes instead of just changing the display style directly.

I would not recommend implementing this kind of interaction with only css.