Advertisement
Guest User

Untitled

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