Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function filterSelection(c) {
- var x, i;
- x = document.getElementsByClassName("column");
- if (c == "all") c = "";
- // Add the "show" class (display:block) to the filtered elements, and remove the "show" class from the elements that are not selected
- for (i = 0; i < x.length; i++) {
- w3RemoveClass(x[i], "show");
- if (x[i].className.indexOf(c) > -1) w3AddClass(x[i], "show");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement