Responsive Fading Carousel Plugin For jQuery - fadeSlider

File Size: 10.9 KB
Views Total: 3431
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Responsive Fading Carousel Plugin For jQuery - fadeSlider

fadeSlider is a small, responsive jQuery slider plugin for generating a cross-fading carousel/slideshow from an image list, with support for animated image descriptions.

How to use it:

1. Create an image list for the carousel.

<div id="slider">
  <ul>
    <li><img src="https://placeimg.com/1000/420/animals" alt="Image Caption 1"/></li>
    <li><img src="https://placeimg.com/1000/420/arch" alt="Image Caption 2"/></li>
    <li><img src="https://placeimg.com/1000/420/nature" alt="Image Caption 3"/></li>
    <li><img src="https://placeimg.com/1000/420/people" alt="Image Caption 4"/></li>
    <li><img src="https://placeimg.com/1000/420/tech" alt="Image Caption 5"/></li>
  </ul>
</div>

2. Include both jQuery library and the JavaScript file fadeslider.js on the webpage.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="js/fadeslider.js"></script>

3. Initialize the carousel by calling the function on the html list.

$('#slider').fadeslider();

4. The carousel is fully customizable via CSS styles as these:

#slider {
  max-width: 1000px;
  width: auto;
  max-height: 410px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background-color: #000;
}

#slider ul {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
  display: block;
  float: left;
  overflow: hidden;
}

#slider ul li {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  list-style-type: none;
  float: left;
  overflow: hidden;
  border: 0;
  display: block;
}

#slider ul li img {
  border: 0;
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-height: 100%;
}

#slider a {
  width: 35px;
  height: 60px;
  margin: 0px;
  position: absolute;
  top: 41%;
  outline: 0;
  opacity: 0.2
}

#slider a:hover { opacity: 0.5 }

#subuprev {
  left: 0;
  background: url("arrow_prev.png") no-repeat;
  cursor: pointer;
}

#subunext {
  right: 0;
  background: url("arrow_next.png") no-repeat;
  cursor: pointer;
}

#sliderBulet {
  width: 200px;
  height: 30px;
  position: absolute;
  bottom: 0;
  left: 10%;
  overflow: hidden;
}

#sliderBulet>div {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  margin-right: 15px;
  float: left;
  background: url("bullet_grey.png") no-repeat;
  text-align: center;
}

.bulletactive { background: url("bullet_yellow.png") no-repeat !important; }

.slider-title {
  position: absolute;
  left: 30px;
  top: 0px;
  z-index: 2;
  background: url("black-dot.png");
  padding: 20px;
  font-size: 26px;
  color: #fff;
}

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