I’m using Smooth Div Scroll to create a stock ticker like scrollbar on a website. I have the Ajax function created that will dynamically load the data into the ticker and successfully scroll it along the bottom of the page.
What I’d like to do is once the loaded info is displayed and it loops through and gets to the end of the loop, call the function again to re-load the data and display any changes.
I am not sure how to call this function at the end of the loop like this. Any thoughts on how I could accomplish it?
Thanks!
Here’s what my smooth div jquery call looks like
$("div#scrollingText").smoothDivScroll({autoScroll: "always", autoScrollDirection: "right", autoScrollStep: 1, autoScrollInterval: 30});
If you’re scrolling to the right then the
autoScrollRightLimitReachedcallback will be fired (if you supply one) when it gets to the end, so you can reload the content and restart from there. Perhaps something like this (just a guess at one way to do it given you haven’t shown your ajax code):Alternatively within your
autoScrollRightLimitReachedcallback you could use thereplaceContentmethod: