CASE statement Afterwards applied, although the order of the code is different (fade-out/fade-in onClick button event)

Is there anyone that can explain why this happens? And very maybe even a way how to circumvent it?