I use these JavaScript-code to change classes in my script:
var toggleDirection = function() { group.classList.toggle(\'left-to-right\'); group.classLis
If I need to toggle multiple classes I just create an array and then iterate through it.
var classes = [ "red", "blue", "green", "purple" ] for (var i = 0; i < classes.length; i++){ p.classList.toggle(classes[i]) }