Elastislide is a responsive image carousel that will adapt fluidly in a layout. It is a jQuery plugin that can be laid out horizontally or vertically with a pre-defined minimum number of shown images
Alterations allows user to pass in either a number OR function to minItems.
The function takes one parameter "ww" (window width), and must return
a number (which becomes the minItems value).
Alterations allows user to pass in either a number OR function to minItems. The function takes one parameter "ww" (window width), and must return a number (which becomes the minItems value).
So it could look like this:
$('#carousel').elastislide({ minItems : function (ww) { return ((ww < 480) ? 3 : (ww < 768) ? 4 : 5); } });
So if window width is less than 480, minItems is 3, less than 768 its 4 otherwise minItems is 5.