Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling Doesn't Loop #27

Closed
ghost opened this issue Aug 16, 2012 · 1 comment
Closed

Scrolling Doesn't Loop #27

ghost opened this issue Aug 16, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 16, 2012

I saw another thread started that sounded like this issue, but it didn't seem to have the answer I was looking for.

On the demo page, the scrolling ends at the Radio Shack logo and just stops moving, but I thought it's supposed to loop around endlessly like a belt? My scrolling logos are doing the same thing on my website... am I misunderstanding what an endless loop is supposed to do?

@tkahn
Copy link
Owner

tkahn commented Sep 10, 2012

Hi!

I got the exact same question on Stackoverflow (http://stackoverflow.com/questions/11935652/smooth-div-scroll-jquery-plugin-endless-loop-not-working) and answered it there, but since I'm not sure if it was you who asked that question as well, I'll post the answer here too:

The reason why the scroller grinded to a halt when it came to the Radio Shack logo was that the scrollable area didn't contain enough logos "to go around". So when it reached the Radio Shack logo and tried to swap for the next logo in the never ending queue, there was no free (not visible) logo to switch to.

I fixed this by adding a couple of more logos to the scrollable area. If you try the same demo page (http://smoothdivscroll.com/clickableLogoParade.html) now it will work fine. Sorry about the faulty demo!

Two important rules when you implements Smooth Div Scroll:

  1. The combined width of all the elements inside the scrollable area need to be bigger than the width of the scroller.
  2. If you are using the autoscrolling option, apart from rule 1, you also need to make sure that there are enough elements so the scroller can swap.

For rule number 2 you can imagine a man standing by a conveyor belt full of printed photos. Every time a photo falls off the edge at the end, this man picks it up, runs to the beginning of the conveyor belt and puts it there. And this goes on in a never-ending loop.

Good luck!

/Thomas

@tkahn tkahn closed this as completed Sep 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant