JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<head>
<body>
<div>This is a div with no Class</div>
</body>
<html>
CSS
div{background-color:blue;color:white;}
.red{background-color:red;}
JavaScript
$(document).ready(function(){
$('div').click(function(){
$(this).addClass('red');
});
});