Easy-to-use Image Slider / Carousel With jQuery - Peasy Slide
File Size: | 4.42 KB |
---|---|
Views Total: | 587 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

The jQuery Peasy Slide takes a list of images and converts them into a basic carousel slider with subtle slide & fade effects when rotating through slides.
How to use it:
1. Embed you images into an Html list as follows:
<ul class="easy-peasy"> <li><img src="1.jpg" alt=""></li> <li><img src="2.jpg" alt=""></li> <li><img src="3.jpg" alt=""></li> <li><img src="4.jpg" alt=""></li> <li><img src="5.jpg" alt=""></li> </ul>
2. Put jQuery library and the main JavaScript file easy-peasy.js
at the bottom of the webpage.
<script src="//code.jquery.com/jquery-3.1.1.min.js"></script> <script src="easy-peasy.js"></script>
3. Let's start to style the slider.
.easy-peasy { position: relative; padding: 0; margin: 20px auto; } .easy-peasy .slides, .easy-peasy li { list-style: none; position: absolute; top: 0; left: 0; padding: 0; margin: 0; transition: all 0.5s ease; opacity: 0; } .previous-slide.active, .next-slide.active, .previous-slide, .next-slide { z-index: 9; } .easy-peasy .next-slide.slides { left: 600px; opacity: 0; } .easy-peasy .previous-slide.slides { left: -600px; opacity: 0; } .easy-peasy .active.slides { opacity: 1; }
4. Style the next/prev navigation buttons.
span[class^="easy-peasy"] { border: 1px solid #333; background: #333; color: #ccc; border-radius: 5px; cursor: pointer; padding: 5px 15px; display: inline-block; position: absolute; z-index: 5; } span[class^="easy-peasy"]:hover { color: #333; background: #ccc; } .easy-peasy-back { left: 0px; bottom: -50px; } .easy-peasy-next { right: 0; bottom: -50px; }
This awesome jQuery plugin is developed by arcinjuan. For more Advanced Usages, please check the demo page or visit the official website.