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

118
Visualizações
JS doesn't run in Shopify section

I'm having a hard time figuring this out. I've added the following JavaScript inline to a Shopify section:

let hash = window.location.hash;
let tab = document.querySelector(hash + " + div #tab-" + urlParams.tab);
tab.checked = true;

What it does: switches between accordion tabs based on a URL parameter. The accordion tabs were built using checkboxes and styled with CSS according to the "checked" item. Three things:

  1. It works as intended in the dev console but not when loading the page.
  2. Checking el.checked on each of the tabs reveals that the correct one is checked after page load (the others are false).
  3. The console can log on page load from my script.

Is there maybe something weird that Shopify does? I don't have a ton of Shopify experience.

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