I'm using woocommerce composite products, and I want to trigger a separate gsap animation when each product is chosen. Here is the code that I'm using:
var radiostock1 = document.getElementById("component_option_thumbnail_259")
if (radiostock1.checked==true){gsap.fromTo(".chassis_stock1", {autoAlpha: 0}, {autoAlpha: 1, duration: 5});}
The animation works when ran by itself, but is unable to sense when the products are chosen. Is there any kind of fix for woocommerce compatibility with custom javascript?