Basic jQuery Slider With Animated Image Captions - miniSlider

Basic jQuery Slider With Animated Image Captions - miniSlider
File Size: 10.2 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

miniSlider is a small, responsive and cross-browser jQuery slider plugin which automatically slides through a sequence of images with animated image captions defined in the alt attribute.

View more:

How to use it:

1. Create an html list of slide images and define the image descriptions (captions) using the regular 'alt' attribute as follows:

<div id="slider">
  <ul>
    <li class="subuActive"><img src="1.jpg" alt="Caption 1"></li>
    <li><img src="2.jpg" alt="Caption 2"></li>
    <li><img src="3.jpg" alt="Caption 3"></li>
    <li><img src="4.jpg" alt="Caption 4"></li>
    <li><img src="5.jpg" alt="Caption 5"></li>
    ...
  </ul>
</div>

2. Include the latest jQuery library and the jQuery miniSlider plugin's script at the bottom of the webpage.

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

3. Modify, override the following styles and add them into the webpage or existing CSS file.

#slider-div {
  max-width: 1000px;
  height: 420px;
  padding: 10px;
  overflow: hidden;
  margin: 0 auto;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  background-color: #fff;
  border: 1px solid #ccc;
}

#slider {
  min-width: 100%;
  min-height: 100%;
  overflow: hidden;
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

#slider ul {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
  display: inline-block;
  float: left;
}

#slider ul li {
  margin: 0;
  padding: 0;
  list-style-type: none;
  float: left;
  background-color: #fff;
  border: 0;
  display: inline-block;
}

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

#slider a {
  width: 45px;
  height: 45px;
  margin: 10px;
  position: absolute;
  top: 42%;
  outline: 0;
  opacity: 0.3;
  z-index: 100
}

#slider a:hover { opacity: 1 }

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

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

#sliderBulet {
  height: 30px;
  position: absolute;
  right: 10px;
  top: 20px;
  overflow: hidden;
}

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

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

.slider-title {
  width: 60%;
  position: absolute;
  left: 60px;
  bottom: -100px;
  z-index: 2; /*background: url("black-dot.png");*/
  padding: 0px;
  font-family: 'Roboto Slab', serif;
  font-weight: normal;
  font-size: 40px;
  color: #fff;
}

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