After implementing interactions triggered by clicks, I opted out of using switch statements to ensure readability. However, all transitions seem to be ending abruptly without smoothness. Despite setting transition timings in CSS properties such as * { transition: all 0.5s; }
and body { transition: all 0.5s; }
, the changes are not seamless. Even a simple background change lacks smoothness. My struggle involves handling innerHTML changes without abrupt transitions between them. How can I achieve smooth transitions for all elements? Any suggestions appreciated! 😊
var text = 0;
function changeText() {
text += 1;
// Code for transitioning texts and elements
}