JSFiddle - React, Tailwind, and code Playground

by roXon

HTML

<div id="cardSlots">
<div class="ui-droppable" tabindex="-1" id="card1">one</div>
<div class="ui-droppable" tabindex="-1" id="card2">two</div>
<div class="ui-droppable" tabindex="-1">three</div>
<div class="ui-droppable" tabindex="-1">four</div>
</div>

JavaScript

$('#cardSlots .ui-droppable[id]').each(function(){
    alert( this.id );
    $(this).css({color:'red'});
});