i had problem with rotating icon while click on it. i tried to use key frame for rotating angle icon:
@keyframes rotateAngle {
0%{
transform: rotate(-180deg);
}
}
and i used it in javascript function like this:
function changeAngle(e) {
let angleIcon = e.currentTarget.querySelector("i");
angleIcon.classList.toggle("fa-angle-up");
angleIcon.style.animation = 'rotateAngle 0.6s'
}
it works, but only for first click.