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

139
Vistas
How do I make my Autoscroll stop when it gets back to the top

I have zero idea what I'm doing and am surprised I made it this far. I'm making an animated banner with Pharma Important safety information that needs to auto scroll. I have it over flow:scrolling and when the animation ends it start to autoscroll, then the animation loops when the copy scrolls back to the top, but the copy keeps scrolling and I need it to wait till the animation ends again.

thing.isi_auto = function(event) {
  DivElmnt = document.getElementById('elementID');
  DivElmnt.onmouseover = pauseDiv;
  DivElmnt.onmouseout = resumeDiv;
  ReachedMaxScroll = false;
  DivElmnt.scrollTop = 0;
  PreviousScrollTop = 0;
  ScrollRate = 100;
  ScrollInterval = setInterval('scrollDiv()', ScrollRate);


}

function scrollDiv() {
  if (!ReachedMaxScroll) {
    DivElmnt.scrollTop = PreviousScrollTop;
    PreviousScrollTop++;
    ReachedMaxScroll = DivElmnt.scrollTop >= (DivElmnt.scrollHeight - DivElmnt.offsetHeight);
    
    
  } else {
    DivElmnt.scrollTop = PreviousScrollTop = 0;
    ReachedMaxScroll = false;
    
  }

}

function pauseDiv() {
  clearInterval(ScrollInterval);
}

function resumeDiv() {
  PreviousScrollTop = DivElmnt.scrollTop;
  ScrollInterval = setInterval('scrollDiv()', ScrollRate);
};
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