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

123
Vistas
JavaScript for hiding divs after passing a certain point on the page

Right now, I have it so a button appears after scrolling a certain length down the page but once you click on the button and it brings you to #ordersection, I can't get the button to disappear (when it reaches #ordersection). Right now, I have

var mediaQuery = window.matchMedia( "(max-width: 768px)" );
if (mediaQuery.matches) {
    // window width is at less than 768px
    $(document).scroll(function () {
        var y = $(this).scrollTop();
        if (y > 23500 && y < 40000) {
            $('.order-now-btn-a').fadeIn();
        } else {
            $('.order-now-btn-a').fadeOut();
        }
    });
}
else {
    // window width is greater than 768px
    $(document).scroll(function () {
        var y = $(this).scrollTop();
        if (y > 1000 && y < 80000) {
            $('.order-now').fadeIn();
        } else {
            $('.order-now').fadeOut();
        }
    });
} 

'''

about 4 years ago · Juan Pablo Isaza
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