I am trying to see if the following is possible:
I want to be able to cycle a single div within an element continuously [so the start of the div is by the end of the same div as it cycles.]
This doesn't have to be an existing plugin. I would prefer to not clone the div if possible. The div's width will be set via javascript prior to cycle but might be adjusted in small amounts.
I would appreciate any ideas!
jsBin demo
jQuery:
HTML:
CSS:
It will make clones only once. Than my jQuery script will create a loop that will just play with the
scrollLeft()
element property.N.B: this is just a plain example, you could make
310px
be dynamically calculated, but that's another story, let's keep it simple.What about the marquee plugin?
Demo
Docs
Note that first example in the Demo, that scrolls left, if you set the width of the container to the same size or smaller than your content to scroll it will appear to cycle fluidly.