A fully-automated, flexible, customizable carousel class for Mootools.
Pass it an element with some children and it will figure out where to put the page breaks to show the maximum number of elements per scroll, without skipping any. This even works if the elements all have different widths.
It will inject the next/previous buttons for you (customizable), and will optionally generate pagination controls and inject those as well.
The options for all of the control elements and the Fx used can be specified, although reasonable defaults are already in place. Styling is up to you though.
The easiest setup possible:
new MerryGoRound(element);
Given that element contains some children, MerryGoRound will wrap element with a container element (configurable), then size element to be the sum of its children's widths and margins. Next it calculates which elements to scroll to when the next/previous buttons are pushed. It then injects the next/previous buttons and optionally the pagination controls.
An example that uses some options:
new MerryGoRound(element, { per_page : 2, cycle : true, page_controls : true, selector : 'li' });
What changes with this MerryGoRound is:
new MerryGoRound(element, [options])
1. element - (mixed) An Element or an id string. 2. options - (object, optional) the options described below:
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus