JSFiddle - React, Tailwind, and code Playground
by Karan1412
HTML
<html>
<head>
<title>removeClass</title>
</head>
<body>
<span id="myDiv" class="class1 class2">
Hover Me
</span>
<br />
<input type="button" value="Reset" onclick="location.reload()" />
</body>
</html>
CSS
.class1
{
margin-left:100px;
width:200px;
height:200px;
display:block;
}
.class2
{
background-color:Aqua;
}
JavaScript
$(document).ready(function () {
$("#myDiv").hover(function () {
$(this).removeClass("class1 class2");
});
});