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

158
Vistas
Problem with scrolling in chrome on windows

I used jquery.sticky and jquery.scrollbar I tried scroll sticky block in parallel scroll window. This code is worked, but have some bags in chrome and Edge on windows. (there isn't on ubuntu). When sticky block is scrolling event scroll of window is triggered once. It seems that the scrolling is slow. When the sticky block is in the end position event scroll of window is triggered several. If I comment out lines "$('.content__sidebar').scrollTop(total_scrolled);" the slow scrolling will disappear. Sticky block have some child with jqury.scrollbar. I tried disable jquery.scrollbar but problem remained. Why event scroll of window is triggered once, when sticky block is scrolling?

$('.content__sidebar').sticky({topSpacing:155, bottomSpacing: 310});
$(window).scroll(function(e){
    var scrollTop = $(window).scrollTop();//+10;
    direction = scrollTop-scrollTop_prev;

    console.log({scrollTop:scrollTop,scrollTop_prev:scrollTop_prev,direction:direction,total_scrolled:total_scrolled});
    if (direction_prev>0 && direction<0) { 
        //console.log("revert");
        //total_scrolled = $('.content__sidebar').scrollTop();
    } else if (direction>0) { 
        //console.log("down");
        total_scrolled += direction;
        $('.content__sidebar').scrollTop(total_scrolled);
    } else {
        total_scrolled += direction;
        $('.content__sidebar').scrollTop(total_scrolled);
    }
    if (total_scrolled>$('.content__sidebar').scrollTop()) {
        total_scrolled = $('.content__sidebar').scrollTop();
    }
    if (total_scrolled<0) {
        total_scrolled = 0;
    }
    scrollTop_prev = scrollTop;
    direction_prev = direction;

});
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