- 1.Add the CSS file (carousel.css)
- 2.Add JQuery
- 3.Add carousel.js
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? ;) )
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)