I have a unique feature on my website where there are three buttons stacked on top of each other, in different colors, on the right side. When a user clicks on one of these buttons, I want a div to slide in from the right with the same color as the button selected, covering the screen before redirecting the user to the next page.
My initial thought is to use JavaScript to delay the redirection while utilizing standard CSS animations for the visual effect. Has anyone tried this approach before? Is there a way to implement a delay action after a user clicks on a button?