JSFiddle - React, Tailwind, and code Playground
by fkling
HTML
<div data-background="red" class="item">Hover me!</div>
JavaScript
jQuery('.item').hover(
function() {
var bg = jQuery(this).data('background');
jQuery(this).css("background-color", bg);
},
function() {
var bg = jQuery(this).data('background');
alert(bg);
});