Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

222
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda