jQuery toggleClass example
Toggle class name on click in jQuery
HTML
<html>
<body>
<h1 id="demo">
Javascript
</h1>
<button onclick='document.getElementById("demo").innerHTML="Its Changed", document.getElementById("demo").style.fontSize="100px",document.getElementById("demo").style.color="red"'>
Previous
</button>
</body>
</html>