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

226
Visualizações
Liquid/Shopify - How do I check if a div is out of view?

I'm trying to make a sticky add-to-cart button for my Shopify store without the use of any apps. I have done this so far by duplicating the current add-to-cart button and tweaking the CSS for the second button so it's displayed at the bottom of my product page on top of all other elements. The only problem remaining is that both buttons are showing at the same time.

Right now I want to write an if-statement to handle which of the 2 buttons to show on the page based on if the default add-to-cart button is in or out of view for the user (so if the user has scrolled down past the button). Preferably I'd like a boolean to check weather the first button is in view so I can write an if/else statement to decide which button should be loaded but I'm not finding any solution for Liquid/Shopify coding. Any tips on achieving this?

I'm okay using JavaScript but having trouble implementing it with the Liquid code for my product page.

I'm using the Prestige theme.

about 4 years ago · Santiago Trujillo
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