A horizontal and vertical pagination, provides an easy to use smooth pagination tool.
Syntax
var myFilmStrip = new FilmStrip(element, [, options]);
Arguments:
- element - (string) The string id of an Element that contains the viewPort, filmStrip, and elements
- options - (object, optional) The options object, plus the options described below:
Options
- viewPort
- the css selector of the view port, defaults to ‘.viewPort’
- filmStrip
- the css selector of the film strip element, defaults to ‘.filmStrip”
- btnNext
- the css selector of the next button, defaults to ‘.btnNext’
- btnPrev
- the css selector of the next button, defaults to ‘.btnPrev’
- scrollDir
- the direction you wish your film strip to scroll (vertical, horizontal), defaults to horizontal
- items
- the css selector of the elements that are paginated
- itemPerPage
- the number of items to show per page, defaults to 4
- duration
- the speed you wish the page transition to go, defaults to short
- initialPage
- the initial page to load, defaults is 0
Examples
Usage
1 - set a width and height on your viewPort
2 - initialize JavaScript inside of an onDomReady (examples below)
ex. horizontal paging
var myxFilmStrip = new FilmStrip('myFilmStrip', {
scrollDir: 'horizontal',
items: 'li',
itemsPerPage: 5
});
vertical paging
var myxFilmStrip = new FilmStrip('myFilmStrip', {
scrollDir: 'vertical',
items: 'li',
duration: 'long',
itemsPerPage: 5
});
Requirements
Downloads
- FilmStrip-yc.js 3KB (yui compression)
- FilmStrip.js 4KB (no compression)
Support
for now just email me if you have any questions scott.keller@blastradius.com