JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>

CSS

div {
    background:cyan;
    width:200px;
    height:300px;
}

div.color:before {
    content:'Color me !';
    background:orange;
    width:100px;
    height:100px;
    display:inline-block;
    position:absolute;
}

JavaScript

$('div').addClass('color');

$("div").toggleClass("color").mouseover(function() {  
	$(this).stop().css({  'background':'#FF0000' }); 
	});
	
$("div").toggleClass("color").mouseout(function() {  
    $(this).stop().css({  'background':'#FFFF00' }); 
	});