Answers for "jquery switch class"

13

jquery toggle class

$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
Posted by: Guest on May-14-2020
1

jquert toggleClass condition

// add class [class-name] if condition is true
// or else remove it
$('#foo-bar').toggleClass('class-name', condition)
Posted by: Guest on November-10-2020
0

jquery switch class

$("#yourElement").switchClass("removeClassName", "addClassName", [duration]);
Posted by: Guest on July-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language