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

98
Views
Set selected option from click.. Woocommerce

I need to set the selected option in a Variation product from a clic on a span.. I guess there's ajax somewhere because when you make a normal selection from the dropdown.. there's some infos showing up (remaining sotck and Variation description)..

I'm able to chage the selected option with the clic with this..

  function setSelectedSection(i)
            {
            s = document.getElementById("sections"),
            s.options[i-1].selected = true;
            return;
            }

Where i is the index ..

How can i "trigger" the call to show the Add to Cart button and the Remaining stock/Variation description.

The html code is..

<span id="s2" onClick="setSelectedSection(3)" class="stock-qte"></span>
<span id="s3" onClick="setSelectedSection(4)" class="stock-qte"></span>

etc.. as i have 12 cliquable "zone". Thanks!

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!