, . , , javascript , DOM, CSS, . getElementsByClassName , . , .
function changeNice(){
elementsofClass=document.getElementsByClassName('nice');
for(i=0; i<elementsofClass.length; i++){
elementsofClass[i].style.display='none';
}}
<a href="#" onclick="changeNice();" class="sorter">#NiceToKnow</a>
<div id="cards1" class="nice">TEST 1</div>
<div id="cards2" class="nice">TEST 2</div>
<div id="cards3" class="nice">TEST 3</div>
<div id="cards4" class="video">I don't HIDE</div>
Hide resultID. .