I’m working on a horizontal gallery that will display mixtape covers, I have five divs with an id of panel_1, panel_2, etc. What happends is when I reach panel 5 and continue to scroll, it doesnt loop back to panel 1 again as I would like it to.
You can view what I have so far here: http://worldwidemixtapes.com/newtheme.html
My knowledge of jQuery is beginner but I have implemented jquery plugins before and can understand some of the methods if explained well.
This is my first question so if its too vague, please let me know so I can be more specific.
Thanks for your help!
<div id="mixtapeWallInner">
<div id="panel_1" class="mixtapePanel current" style="left: -972px; "></div>
<div id="panel_2" class="mixtapePanel" style="left: -972px; "></div>
<div id="panel_3" class="mixtapePanel" style="left: -972px; "></div>
<div id="panel_4" class="mixtapePanel" style="left: -972px; "></div>
<div id="panel_5" class="mixtapePanel last" style="left: -972px; "></div>
</div>
Solution 2:
Took a little time but I coded up a “seemingly endless” carousel. Pretty much what happens here is the script will move a
divin the DOM to the end or beginning of the cycle depending on which direction you’re moving.http://jsfiddle.net/wdm954/8GKz6/11
(Please include the comments when using this code.)
Solution 1:
When creating a content “carousel” such as this a common technique is to jump back to the first DIV when you’re trying to scroll past the last DIV. Here is a basic example I coded up…
http://jsfiddle.net/wdm954/VFwLT/5/