JSFiddle - React, Tailwind, and code Playground
by dirtyd77
HTML
<span class="clickable">Span 1</span>
<span class="clickable">Span 2</span>
<span class="clickable">Span 3</span>
CSS
.last-clicked{ font-weight:bold; }
JavaScript
$('.clickable').click(function(event) {
$('.clickable').removeClass('last-clicked').end().find(event.target).addClass('last-clicked');
});