TAGS :Viewed: 6 - Published at: a few seconds ago

[ DIV with Circular Scrolling ]

I am trying to create a DIV with circular scrolling. Here is an example of something similar to what I am trying to achieve. In my case, the DIV contains a series of images. Here is a demo, sans Javascript.

My goal is for the DIV to do the following:

  • If you scroll to the bottom of the DIV, scrolling would start over again at the beginning, giving the impression of circular scrolling
  • The reverse would also be true if you scroll to the top

I don't think it can be achieved my simply jumping from the top to the bottom. Since the content is different (unlike in the example I gave above) the user would see that the DIV was jumping. I am also not interested in carousel plugins that rely on skipping ahead one image at a time. My goal is that the DIV would behave like a standard DIV with overflow set to scroll, only the scrolling would be circular.

Is there any plugin that exists already that accomplishes this?

Answer 1


The plugin http://ianli.com/infinitedrag/ does pretty much exaclty what you are looking for. It even has an "axis" for only allowing it to scroll top-bottom and not all over like your first example link.