Skip to content

michelre/carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carousel

Installation

  • 1.Add the CSS file (carousel.css)
  • 2.Add JQuery
  • 3.Add carousel.js
You have an example in the index.html file.

Start

It's pretty simple to start the carousel. Create a structure like that in your HTML file:

<pre>
<div id="carousel-wrapper">
  <ul>
    <li>
      <div class="content">
        ...
      </div>
    </li>
    <li>
      <div class="content">
        ...
      </div>
    </li>
  </ul>
</div>
</pre>

Now, you can instantiate the carousel:


  new Carousel(800, 400)

The first parameter corresponds to the width and the second parameter corresponds to the height. (It's pretty simple, isn't it? ;) )

Using with AngularJS

I created a directive for you to instantiate the carousel:

<pre>
  <div id="carousel-wrapper" ng-carousel="{'width':'100%','height':'500px'}">
    <ul>
      <li>
        <div class="content">
          ...
        </div>
      </li>
      <li>
        <div class="content">
          ...
        </div>
      </li>
    </ul>
  </div>
</pre>

To load the directive, just add carouselDirective in the right angular module:


  angular.module("app", ["carouselDirective"])

I created my résumé with this carousel on my personal website (at the bottom of the page)

About

Very simple carousel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published