I am working with multiple functions that are triggered by scrolling the mouse wheel up and down. These functions must be called in a specific order, but the issue arises when users scroll quickly causing the CSS animations from the previous function to not fully complete before the next function is called. How can I ensure that all CSS animations from the previous functions finish before allowing the user to continue scrolling?