JSFiddle - React, Tailwind, and code Playground

by wirey00

HTML

<li class="boxes" name="bears">bees</li>

JavaScript

$('.boxes').click(function(){
  alert($(this).text() + ' ' + $(this).attr('name'));
});