Help Needed: Struggling with a Simple Interaction Inspired by Apple.com

Apple’s website is undeniably beautiful, and I’m shamelessly taking inspiration (okay, stealing) from one of their interactions—but it’s not going well.

Specifically, on Apple Music - Apple, they have these Title Divs and Information Divs (at least, that’s how I understand it). The interaction seems simple: a button toggles the opacity of the front slide to dim it, revealing the back slide, and then toggles back to the front when pressed again.

Here’s my issue: I can get the front slide to dim and reveal the back, but for some reason, the button refuses to toggle it back. I’m not sure what I’m missing or doing wrong.

Anyone have advice or experience with this type of interaction?