@OSUblake Thank you for your help! That was way more sophisticated way of approaching. Although it was still showing 'opacity:1' when I reload after the trigger. Interestingly, and I don't know why it worked like this, but if I put duration as something really small like 0.0001 instead of 0, that resolved the problem.
Doing so in my original code didn't fix it, it only worked on the new updated code with your suggestion.
Thanks for you help!