Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

100
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda