I have a student portfolio, where every student has a different email address.
My intention is to filter a certain email provider with buttons.
Like the student has an email address from google, i want to filter/show every student who has an email address at google.
My script is working smoothly for the pagination and search function, but there is still an issue with the filter function which causes me some headache.
Here is the main filter function :
function filterSelection(c) {
var x, i;
hideAll();
var new_results = document.getElementsbyClassName(c);
new_results.addClass("result");
displayRange(0, itemTotal);
}
..which is based on the w3schools div hide and show.
I have a button which triggers this function:
<button class="btn active" onclick="filterSelection('google')"> Show all</button>
Can someone help me solving this issue?
Here's the link for my codepen: https://codepen.io/user1010/pen/omxqRz?editors=1010