Automatic Image Rotator Carousel Plugin with jQuery - Download Automatic Image Rotator / Carousel Plugin with jQuery

Download Automatic Image Rotator / Carousel Plugin with jQuery

Posted on

This time I will share jQuery Plugin and tutorial about Automatic Image Rotator / Carousel Plugin with jQuery, hope it will help you in programming stack.

Automatic Image Rotator Carousel Plugin with jQuery - Download Automatic Image Rotator / Carousel Plugin with jQuery
File Size: 7.6 KB
Views Total: 1739
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Yet another jQuery image carousel plugin which automatically rotate through any number of images at a given interval.

How to use it:

1. Insert a list of images together with next/prev navigation buttons into the document.

1 <div class="caroursel rotator-demo">
2   <ul class="rotator-list">
3     <li class="rotator-item"><img src="image/1.jpg"></li>
4     <li class="rotator-item"><img src="image/2.jpg"></li>
5     <li class="rotator-item"><img src="image/3.jpg"></li>
6   </ul>
7   <div class="rotator-btn rotator-prev-btn"></div>
8   <div class="rotator-btn rotator-next-btn"></div>
9 </div>

2. Add jQuery library and the jQuery carousel.js plugin to the web page.

1 <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
2 <script src="js/jquery.carousel.js"></script>

3. Initialize the carousel and we’re ready to go.

1 Caroursel.init($('.caroursel'))

4. Style the image carousel with you own CSS styles.

01 .rotator-main {
02   position: relative;
03   width: 900px;
04   height: 400px
05 }
06  
07 .rotator-main a, .rotator-main img { display: block; }
08  
09 .rotator-main .rotator-list {
10   width: 900px;
11   height: 400px
12 }
13  
14 .rotator-main .rotator-list .rotator-item {
15   position: absolute;
16   left: 0px;
17   top: 0px
18 }
19  
20 .rotator-main .rotator-btn {
21   position: absolute;
22   height: 100%;
23   width: 100px;
24   top: 0px;
25   z-index: 10;
26   opacity: 0;
27 }
28  
29 .rotator-main .rotator-prev-btn {
30   left: 0px;
31   background: url("../image/btn_l.png") no-repeat center center;
32   background-color: red
33 }
34  
35 .rotator-main .rotator-next-btn {
36   right: 0px;
37   background: url("../image/btn_r.png") no-repeat center center;
38   background-color: red
39 }

5. You can pass the options to the carousel plugin using data-setting attribute on the top container.

1 <div class="caroursel rotator-main"
2      data-setting = '{
3       "width":1000,
4       "height":270,
5       "rotatorWidth":640,
6       "rotatorHeight":270,
7       "scale":0.8,
8       "algin":"middle"
9 }'>

This awesome jQuery plugin is developed by JANGFREEMAN. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net