Answers for "how to change class by is in js by toggle"

0

classname toggle js

document.getElementById('myButton').onclick = function() {
    this.classList.toggle('active');
}
Posted by: Guest on July-29-2020
0

how to change class by is in js by toggle

<button class="" id="changeicon">
	<i id="slideshow" class="fas fa-hamburger"></i>
</button>

$("#changeicon").click(function() {
			$("#slideshow").toggleClass("fa-times");
		});
Posted by: Guest on October-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language