Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
How can I have a function be triggered by clicking a woocommerce radio button?

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!