I have a long list of items I need to filter. I want the visible ones. Here\'s an example hidden one:
'.newSearchResultsList li'
li
Array#filter
getComputedStyle
style
none
var liElems = document.querySelectorAll('.newSearchResultsList li'); var filtered = [].filter.call(liElems, function(el) { var style = window.getComputedStyle(el); return (style.display !== 'none') }); console.log(filtered);
dogscats Visible