Using this class you can simply make a Carrousel which actually goes round, instead of flipping back to the front when it reaches the end.
//all options are optional. The here given options are the standard values
document.addEvent("domready",function()
{
var options = {
id: 'carrousel',
itemsWrapper: 'listItems',
itemClass: '.item',
mode: 'horizontal',
buttonPrev: 'butPrev',
buttonNext: 'butNext',
fadeIn: true,
hideControls: true,
duration: 'normal'
};
var carrousel = new Carrousel(options);
});
A standard HTML setup would be:
<div id="carrousel">
<div id="listItems">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
</div>
</div>
Give your #carrousel and div.item CSS-classes a fixed width and height and you're off
Example:
var car = new Carrousel({
onComplete:function()
{
alert(this.currentID); //alerts int. eg: 2
}
});
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