Jump to content
Search Community

spacelady

Members
  • Posts

    1
  • Joined

  • Last visited

spacelady's Achievements

  1. I'm working with the exact same criteria - autoscroll ISI info on pharma banner ads. I am a designer and familiar with AfterEffects and Animate and use those to do all the heavy lifting around animation coding. But I had to manually add in the autoscroll feature because of the requested parameters. I had ChatGPT write this JS code and it works cross platform. It auto-scrolls after a delay then stops on mouseover and restarts on mouseout. Sorry it's not in Codepen. I'm a designer and know just enough code to be dangerous. function () { const isiWrapper = document.querySelector(".isi-wrapper"); let scrolling = false; isiWrapper.addEventListener("mouseover", function () { scrolling = true; }); isiWrapper.addEventListener("mouseout", function () { scrolling = false; }); setTimeout(function scroll() { if (!scrolling) { isiWrapper.scrollTop += 1; } setTimeout(scroll, 140); }, 500);
×
×
  • Create New...