JSFiddle - React, Tailwind, and code Playground

by shengoo

HTML

<p>pppppppppp</p>

CSS

.over{
    color:red;
}

JavaScript

$("p").click(function(){
    if($(this).is(".over")){
        $(this).removeClass("over");
    }else{
        $(this).addClass("over");
    }
});