Auto Cross fading Image Slider For jQuery Lslider - Download Auto Cross-fading Image Slider For jQuery - Lslider

Download Auto Cross-fading Image Slider For jQuery – Lslider

Posted on

This time I will share jQuery Plugin and tutorial about Auto Cross-fading Image Slider For jQuery – Lslider, hope it will help you in programming stack.

Auto Cross fading Image Slider For jQuery Lslider - Download Auto Cross-fading Image Slider For jQuery - Lslider
File Size: 35.6 KB
Views Total: 632
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Lslider is an extremely simple jQuery plugin for creating a basic slider that automatically fades through a series of images just like a slideshow.

How to use it:

1. Create a list of images for the slider.

1 <ul class="lslider">
2   <li class="active"><img src="1.jpg" alt="Item 1" /></li>
3   <li><img src="2.jpg" alt="Item 2" /></li>
4   <li><img src="3.jpg" alt="Item 3" /></li>
5   <li><img src="4.jpg" alt="Item 4" /></li>
6   ...
7 </ul>

2. Put jQuery library and the jQuery Lslider plugin’s script at the bottom of your webpage.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="dist/js/jquery.lslider.js"></script>

3. Initialize the image slider with default options.

1 $('.lslider').lslider();

4. The required CSS styles. Override & modify the CSS styles and insert them to your existing CSS file.

01 .lslider {
02   display: block;
03   margin: 0 auto;
04   width: 960px;
05   height: 360px;
06   box-shadow: 1px 5px 10px rgba(0, 0, 0, 0.5);
07   padding: 0;
08   list-style-type: none;
09 }
10  
11 .lslider li {
12   display: none;
13   position: absolute;
14   margin: 0;
15 }
16  
17 .lslider li.active { display: block; }

5. Set the animation speed & transition delay.

1 $('.lslider').lslider({
2   animationSpeed: 350
3   pause: 5000,   
4 });

6. Callback functions available.

1 $('.lslider').lslider({
2   beforeDisplay: function(e, hiddenElement){},
3   afterDisplay: function(e, visibleElement){}  
4 });

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

source : jqueryscript.net