JSFiddle - React, Tailwind, and code Playground
HTML
<div id="toggler">Script call for toggler</div>
JavaScript
toggleProp=
/*b.b Troy III p.a.e*/
function(e,p,v){
e[p]==v ? e[p]=e.b : (e.b=e[p],e[p]=v);
};
var t = document.getElementById('toggler');
t.setAttribute('onclick', 'toggleProp(this.style, "backgroundColor", "red")');
t.setAttribute('onmouseover', 'toggleProp(this.style, "color", "green")');
t.setAttribute('onmouseout', 'toggleProp(this.style, "color", "blue")');