JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
<div id="click"></div>
CSS
#test {
width: 200px;
height: 70px;
border: solid 2px red;
}
#click {
width: 200px;
height: 70px;
border: solid 2px blue;
}
JavaScript
var clicks = 0
$("#test").click(function(event){ event.target.style.border = "none"; clicks = 0 })
$("#click").click(function(event){
document.getElementById("test").style.border = "solid red " + (++clicks + 2) + "px"
})