JSFiddle - React, Tailwind, and code Playground

HTML

<div id="a">a: <span>A</span></div>
<div id="b">b: <span>B</span></div>

JavaScript

jQuery.each( ["#a", "#b"], function(){
    alert(this);
    $(this).hide(); //not working
    $('#b').hide(); //working
});