Sometime we want to remove the class under some condition on document ready or on document load. It is very simple in the jQuery to remove the Class from the HTML tag. We can remove the class in the HTML tag using jQuery function removeClass().
$('TagSelector').removeClass('Class-Name');
Let's we make the CSS class with black color and with red background and apply this class.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style type="text/css">
.my-class{
color:black;
background-color: red;
padding: 5px;
}
</style>
<button id="mybutton">Click To Remove my-class from div</button>
<div class="my-class" id="mydiv">Write Less ,Do More With jQuery</div>
<script>
$("#mybutton").click(function(){
$("#mydiv").removeClass('my-class');
});
</script>