Hi tuanphan! Thank you so much for your help!
This code worked perfectly, but only for the homepage of my site for some reason. On any other page, the transition doesn't fade out, it just turns off abruptly. Do you have any idea why that might be happening?
For reference, the image at the bottom of this page that says "Crushed Skate Shop" fades in, but doesn't fade out:
https://www.tomalexanderart.com/contracts-1
Thank you so much!