JSFiddle - React, Tailwind, and code Playground

by Toby Neilan

HTML

<div>
data-catid="2"
</div>

CSS

body [data-catid=2]
{background-color: #f1f1f1}

JavaScript

$(document).ready(function(){
$("data-catid=2").hover(function(){
    $(this).parent(this).css('background-color','g#ff1900');
});


$("data-catid=2").mouseleave(function(){
    $(this).parent(this).css('background-color','#f1f1f1');
});});