I want to search through a class for elements that have data-id attribute that matches in the array, and hide them.
The HTML:
<li class="list" data-id="1">one</li>
<li class="list" data-id="2">two</li>
<li class="list" data-id="3">three</li>
<li class="list" data-id="4">four</li>
I have an array:
var dataIDcheck = ['1', '3']
Any ideas on how I can search through the class .list and hide 1 and 3 (or whatever is in the array)?