JavaScript
// add class
$("#Name").addClass("className");
// remove class
$("#Name").removeClass("className");
Html
<html>
<!-- heading -->
<head>
<meta charset="utf-8">
<title>Example</title>
<!-- styles -->
<style>
.my {color:green; font-weight:600;}
</style>
</head>
<!-- page -->
<body>
<!-- connect the library jQuery -->
<script src="https://dir.by/example_lib/jquery/jquery-3.3.1.min.js"></script>
<!-- HTML Elements -->
<div id="myElement1">
Hello
</div>
<!-- JavaScript -->
<script>
// the page has opened
$( function()
{
// looking for an element by ID and add a class
$("#myElement1").addClass("my");
// <div id="myElement1"> Hello </div>
// looking for an element by ID and delete the class
$("#myElement1").removeClass("my");
// <div id="myElement1"> Hello </div>
});
</script>
</body>
</html>