HTML List Based Carousel Plugin - jQuery Slider.js

File Size: 3.97 KB
Views Total: 10115
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
HTML List Based Carousel Plugin - jQuery Slider.js

A simple, lightweight, semantic jQuery slider plugin for generating a basic carousel/slider from a normal HTML unordered list. Features auto play, infinite loop, and navigation/pagination controls.

How to use it:

1. Create a list of slides together with the navigation controls on the web page.

<div id="slider">
  <a href="#" class="next">></a>
  <a href="#" class="prev"><</a>
    <li>SLIDE 1</li>
    <li>SLIDE 2</li>
    <li>SLIDE 3</li>
    <li>SLIDE 4</li>
    <li>SLIDE 5</li>

2. Link to jQuery JavaScript library and the jQuery Slider.js script.

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

3. The example CSS for the carousel/slider.

#slider {
  position: relative;
  overflow: hidden;
  width: 400px;
  height: 300px;

#slider ul {
  position: relative;
  margin: 0;
  padding: 0;
  height: 200px;
  list-style: none;
  left: 0px;

#slider ul li {
  position: relative;
  display: block;
  float: left;
  margin: 0;
  padding: 0;
  width: 400px;
  height: 300px;

a.prev, {
  position: absolute;
  top: 40%;
  z-index: 999;
  display: block;
  padding: 4% 3%;
  width: auto;
  height: auto;
  background: #2a2a2a;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  opacity: 0.8;
  cursor: pointer;
a.prev:hover, {
  opacity: 1;
  -webkit-transition: all 0.2s ease;

a.prev {
  border-radius: 0 2px 2px 0;
} {
  right: 0;
  border-radius: 2px 0 0 2px;

4. Initialize the slider/carousel and done.


5. Enable the autoplay.

  autoplay: true,
  playTime: 5000

6. Disable the infinite loop.

  type: 'hiddenAnchor'

7. Enable navigation controls.

  navigation: true,
  next: 'next',
  prev: 'prev'

8. Set the delay between each slide.

  delay: 200

9. Set the height & width of the carousel/slider.

  width: 700,
  height: 300

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