JSFiddle - React, Tailwind, and code Playground

HTML

<div id="div1">
<span>1</span>
<span>2</span>
</div>

CSS

.ganteng { font-weight:bold; color:red }

JavaScript

$('#div1').click(function() {
    $('span:first', this).prop('class', 'ganteng');
});