Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!