jsor/jcarousel — Issue #326: Example for supporting multiple rows in jcarousel
Author: joni78
Created: 2012-02-27 11:48:07+00:00
State: open

Hi,

Not sure where to submit this (it's not a bug), but I wanted to share something that I think others will struggle with as well. It is the JS code I use to create the
items to support a jCarousel with multiple rows with elegant flow of items, i.e. fill horizontally, then vertically, then pages:

123 | 789
456 | 0AB

It will add (value of var carouselRows) items to a single
and as such allows jCarousel to support multiple rows without modifying the original jCarousel code. I think it would be nice to have an example of this on the jCarousel page.

// Populate Album photos with support for multiple rows filling first columns, then rows, then pages
var carouselRows=3; // number of rows in the carousel
var carouselColumns=5 // number of columns per carousel page
var numItems=25; // the total number of items to display in jcarousel

for (var indexpage=0; indexpage with the
items jCarousel should be invoked.

Hope this helps someone.

Jonathan