jquery toggle class
$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
jquery toggle class
$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
classname toggle js
document.getElementById('myButton').onclick = function() {
this.classList.toggle('active');
}
toggle class javascript
var menu = document.querySelector('.menu') // Using a class instead, see note below.
menu.classList.toggle('hidden-phone');
how to add toggle class in javascript using css modules
onClick() {
alert("clicked");
$('.'+ styles.transform ).toggleClass(styles.transform-active);
}
classname toggle js
document.getElementById('myButton').onclick = function() {
var className = ' ' + myButton.className + ' ';
if ( ~className.indexOf(' active ') ) {
this.className = className.replace(' active ', ' ');
} else {
this.className += ' active';
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us