DEV Community

Jim Frenette
Jim Frenette

Posted on • Originally published at

Responsive Content Filter JavaScript

This code sample shows how to create a responsive list filter using plain JavaScript (no jQuery). JavaScript gets the breakpoint value from a hidden css pseudo element that uses a media query to set its value. Therefore, it is not necessary to maintain rendundant responsive breakpoint values in the script.

All of the code is available to edit and demo in our online sandbox.


jQuery version

Top comments (0)