how to change class by is in js by toggle
document.getElementById('myButton').onclick = function() {
this.classList.toggle('active');
}<button class="" id="changeicon">
<i id="slideshow" class="fas fa-hamburger"></i>
</button>
$("#changeicon").click(function() {
$("#slideshow").toggleClass("fa-times");
});
Also in JavaScript:
- how to create a smooth effect in javasript
- callout react
- Something bad happened. caprover
- jquery if attribute
- how to turn of autocomplete in react hook form material ui
- kendo jquery listview
- cypress memory leak
- ajax is not a function
- promise in javascript
- react native timed out waiting for modules to be invalidated
- javascript split array into chunks
- nodejs add to array
- textinput onpress react native
- mongoose update array in object
- eslint ignore current line
- short string javascript
- how to create a constant in javascript
- encrypt and decrypt in nodejs
- javascript press tab key
- convert data into json format in javascript
- how to get MAC id of nodemcu
- Javascript remove all child elements
- jquery remove string from string
- angular on back skip routes