Skip to content

tomerdmnt/carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carousel

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();

Installation

$ component install tomerdmnt/carousel

API

(el)

Binds to the container element of the carousel.

next()

Show the next item. if there is none returns null.

prev()

Show the previous item. if there is none returns null.

License

MIT

About

Simple carousel component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published