JSFiddle - React, Tailwind, and code Playground

HTML

<button>Hello</button>

CSS

button {
		background-color: blue;
	}
	.green {
		background-color: green;
	}
	.red {
		background-color: red;
	}

JavaScript

$('button').click(function(e) {
			$(this).toggleClass('red');
		});
		$('button').hover(function(e) {
			console.log('hoverin');
			$(this).toggleClass('green');
		});