Skip to content

apollopy/carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carousel

A carousel plugin for jQuery.

Development

$ sudo npm install -g coffee-script $ sudo npm install -g uglify-js

Example

add JavaScript

<script src="vendor/jquery.1.10.1.min.js"></script>
<script src="carousel.js"></script>

basic HTML

<div class="js-carousel-box">
  <ul class="js-carousel-inner">
    <li class="item active">...</li>
    <li class="item">...</li>
    <li class="item">...</li>
    <li class="item">...</li>
  </ul>
</div>

add CSS

.js-carousel-box { 
  position: relative;
  overflow: hidden;
  /* adjust these to your needs */
  width: 740px;
  height: 260px;
}
.js-carousel-inner {
  position: absolute;
}
.js-carousel-inner .item {
  display: none;
  position: absolute;
}
.js-carousel-inner .active {
  display: block;
}

setup Carousel

<script>
  $('.js-carousel-box').carousel(/*options*/);
</script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published