Simple carousel component. Check out tomerdmnt/carousel-slide for the same thing with slide transition.
<div id="myCarousel">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
var Carousel = require('carousel');
var c = Carousel(document.getElementById('myCarousel');
// show next item
c.next();
// show previous item
c.prev();
$ component install tomerdmnt/carousel
Binds to the container element of the carousel.
Show the next item. if there is none returns null.
Show the previous item. if there is none returns null.
MIT