I'm working on coverting a JQuery project to pure JavaScript and I'm stuck with the following bit of code.
$(".element-has-class:visible")
I thought perhaps something along these lines might work to catch all visible element (in the case of my project list items) but I've had no luck:
function functionName (){
var elementsOnShow = document.getElementsByClassName('element-has-class').find(isVisible);
}
function isVisible(element) {
return element.style.display === 'block';
}
(block
has been set in the CSS). Is there anyway to get all visible elements within one variable?