Basic jQuery Based Image Carousel Slider with Thumbnail Navigation

File Size: 4.45 KB
Views Total: 3937
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Basic jQuery Based Image Carousel Slider with Thumbnail Navigation

A basic jQuery & easing based image carousel slider which enables you to loop through a list of images with arrows and thumbnails navigation.

How to use it:

1. Add the necessary jQuery library and jQuery easing plugin into your web page.

<script src="jquery.js"></script> 
<script src="jquery.easing.min.js"></script> 

2. Add the 'slide.js' script after jQuery library.

<script src="slide.js"></script>

3. Add a list of images together with navigation arrows and thumbnails into your web page.

<div id="slide">
  <ul class="gallery">
    <li><a href="#"><img src="01.jpg"></a></li>
    <li><a href="#"><img src="02.jpg"></a></li>
    <li><a href="#"><img src="03.jpg"></a></li>
    <li><a href="#"><img src="04.jpg"></a></li>
    <li><a href="#"><img src="05.jpg"></a></li>
    ...
  </ul>
  <span class="lt-control">
    <img src="l-btn.png">
  </span> 
  <span class="rt-control">
    <img src="r-btn.png">
  </span>
  <div class="btn">
    <p class="btn-current"><img src="01.jpg"></p>
    <p><img src="02.jpg"></p>
    <p><img src="03.jpg"></p>
    <p><img src="04.jpg"></p>
    <p><img src="05.jpg"></p>
    ...
  </div>
</div>

4. Initialize the image carousel slider by calling the function on the top element.

slide({

  // wrapper element
  wrap:"slide",

  // autoplay duration
  duration:2000

});

5. The CSS to style the image carousel slider. Feel free to modify or override them to create your own styles.

#slide {
  width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  height: 572px;
}

#slide span {
  position: absolute;
  display: block;
  width: 44px;
  height: 44px;
  opacity: 0.4;
  filter: alpha(opacity=40);
  cursor: pointer;
  transition: 0.3s;
}

#slide span:hover {
  opacity: 1;
  filter: alpha(opacity=100);
}

.lt-control {
  left: 10px;
  top: 228px;
}

.rt-control {
  right: 10px;
  top: 228px;
}

.gallery {
  list-style: none;
  width: 1200px;
  height: 500px;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

.gallery li { float: left; }

.gallery li img {
  display: block;
  border: none;
}

.btn {
  height: 70px;
  margin: 500px 0 0 0;
  text-align: center;
}

.btn p {
  width: 140px;
  height: 62px;
  border: 5px solid #bbb;
  background: #eee;
  float: left;
  cursor: pointer;
  transition: 0.3s;
  opacity: 0.6;
}

.btn p.btn-current {
  border: 5px solid #da0000;
  opacity: 1;
}

.btn img {
  width: 140px;
  height: 62px;
  display: block;
}

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