Lightweight jQuery Slider Plugin with CSS3 Transitions - acSlides.js

File Size: 3.94 KB
Views Total: 3174
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Lightweight jQuery Slider Plugin with CSS3 Transitions - acSlides.js

A lightweight implementation of an unobtrusive and efficient content slider using jQuery, CSS and CSS3 transitions.

How to use it:

1. The required markup structure for the slider.

<div class="slides">
  <div class="slides_wraper">
    <div class="slides_li">Slide One</div>
    <div class="slides_li">Slide Two</div>
    <div class="slides_li">Slide Three</div>
  </div>
</div>

2. Include jQuery library and the jQuery acSlides.js plugin on the webpage.

<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="jquery.acSlides.js"></script>

3. Initialize the slider by calling the function on the top element

$(function(){
  $(".slides").acSlides();
})

4. The basic CSS /CSS3 styles for the slider.

.slides {
  position: relative;
  overflow: hidden;
}

.slides .slides_wraper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
  transition: all .7s ease;
  -webkit-transition: all .7s ease;
  -moz-transition: all .7s ease;
  -o-transition: all .7s ease;
}

.slides .slides_li {
  width: 100%;
  float: left;
}

5. Style the bullets navigation.

.slides .slides_nav {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 15px;
  right: 0;
  background: transparent;
  height: 16px;
  text-align: center;
}

.slides .slides_nav ul {
  display: inline-block;
  list-style: none;
  margin: 0;
}

.slides .slides_nav li {
  width: 26px;
  float: left;
  height: 16px;
  list-style: none;
}

.slides .slides_nav a {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #757575;
  border-radius: 5px;
  transition: all .1s ease-out;
  -webkit-transition: all .1s ease-out;
  -moz-transition: all .1s ease-out;
  -o-transition: all .1s ease-out;
}

.slides .slides_nav a.current {
  width: 20px;
  background-color: #ff3d00;
}

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