Currently I have a code structure:
if(target.classList.contains('animate-heading')){
}else if(target.classList.contains('animate-text')){
}else if(target.classList.contains('animate-buttons')){
}else if(target.classList.contains('image-rotating-animation')){
}else if(target.classList.contains('plans-heading-animation')){
}else if(target.classList.contains('plans-animation')){
}else if(target.classList.contains('animate-masonry')){
}
which I want to replace with switch-case statements, is it possible to do it? Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire