title: count the number of times an element has a specific style
body: <p>I tried to count the number of times an element has a specific class. Sadly I am always getting</p>
  <blockquote>
  <p>$(...)[c].css is not a function</p>
  </blockquote>
  <p>Is jquery trying to bully me?</p>
  <p>Here is my code:</p>
  <pre><code>// vanish the headings of the empty lists
  let ulAll = document.querySelectorAll(&quot;ul.clearfix&quot;);
  let counter = 0;
  
  for(i = 0; i &lt; ulAll.length; i++) {
      let ul = $(ulAll)[i].children;
      for(c = 0; c &lt; ul.length; c++) {
          console.log($(ul)[c]);
          if($(ul)[c].css(&quot;display&quot;) == &quot;none&quot;) {
              counter++;
              console.log(counter);
          }
      }
  }
  </code></pre>
  <p>Thanks in advance!</p>