Toggle class name from div tag by clicking on button using JavaScript.

in this code we learn how to toggle class name without using toggle option in javascript .
function myFunction() {
   var element = document.getElementById("myDIV");
   element.classList.toggle("mystyle");
}
we will be using other method to make this(toggle class) maybe this code will be useful for you in your codding
Toggle class name from div tag by clicking on button using JavaScript.

© Manajmnt code

Share to :

Comments