Responsive slider

by w3widgets


Fully responsive

CSS markup that was created for our slider takes care of handling display on all possible devices

One to one swipe movement

Unlike most sliders, it supports one to one swipe movement representation on changed slides

Twitter bootstrap integration

You can use responsive slider independently but it shows full potencial when coupled with bootstrap

Animated captions

Each slide content can be animated. Moreover, You can write your own custom animations if necessary

HTML5 and CSS3 supported

We are putting all the effort to support newest standards while keeping backwards compatibility

Under constant development

Responsive slider in under constant development so you can return from time to time for new features


By downloading the software you are accepting the license.


Non commercial use

If you want to use the software on a webpage that's not related to any business (online store, service provider etc.) you can do it without charge.



Single application

Your use of the item is restricted to a single installation



Multiple applications

Your use of the item may extend to multiple installations




You may license, sublicense, redistribute, or resell the item in some circumstances.


You gonna need to put some stuff to your <head> tag:

<script src="js/jquery.js"></script>
<script src="js/jquery.event.move.js"></script>
<script src="js/responsive-slider.js"></script>

<link href="css/responsive-slider.css" rel="stylesheet" media="screen">

Responsive Slider requires jQuery (v1.9.1+) and jQuery.event.move plugin. You will get all necessary files in the Responsive Slider archive thet you can download from this page.

Build your slider markup:

<div class="responsive-slider" data-spy="responsive-slider" data-autoplay="true" data-interval="5000" data-transitiontime="300">
  <div class="slides" data-group="slides">
        <div class="slide-body" data-group="slide">
          <img src="img/slide-1.jpg">
          <div class="caption" data-animate="slideAppearRightToLeft" data-delay="500" data-length="300">
            <h2><i class="icon-gift"></i> Responsive slider</h2>
            <div class="caption" data-animate="slideAppearLeftToRight" data-delay="800" data-length="300">With one to one swipe movement!</div>
      . . .
  <a class="slider-control left" href="#" data-jump="prev"><i class="icon-angle-left"></i></a>
  <a class="slider-control right" href="#" data-jump="next"><i class="icon-angle-right"></i></a>
  <div class="pages">
    <a class="page" href="#" data-jump-to="1">1</a>
    <a class="page" href="#" data-jump-to="2">2</a>
    <a class="page" href="#" data-jump-to="3">3</a>

The slider have entire markup exposed to you so you can easily edit it by for example adding your own classes. Note that you don't need any of the classes that you can see in the example however [data-group] properties are obligatory. You can initialize the plugin and set options directly from markup using data interface. For example, you can set captions animation properties by setting data-animate, data-delay or data-length. By data-jump attribute you can set prev/next buttons and by using data-jump-to pages indicators can by easily setup. In this example we initialized the plugin by using data-spy="responsive-slider".

You can also initialize the plugin using JavaScript. This way you can also setup callback functions.

$( document ).ready( function() {


There are some options that can be setup both thru data interface and javascript on plugin initialization. Options that are avaliable on init are more general ones while data interface handles component specific ones.


You can specify options thru javascript on plugin init:

$( document ).ready( function() {
    autoplay: true,
    interval: 5000,
    transitionTime: 300

Options overview:

Option Dafault Description
autoplay /bool/ false Autoplay flag, if set to true the slider will change slides every few seconds
interval /int/ 5000 Interval between slides change in miliseconds
transitionTime /int/ 300 Slide change transition time in miliseconds
touch /bool/ true When set to false disables touch/swipe slide change
parallax /bool/ false When set to true script will move background of [data-group="slides"] element
parallaxDistance /float/ (1/10) Distance for the background to move compared to slide move distance
parallaxDirection /int/ 1 1 or -1 to switch default direction
moveDistanceToSlideChange /int/ 4 Fraction of the slidar width you have to move you finger to change slide. Default 4 means that you have to swipe through 1/4 of the slide width.

Data API

Option Value Object Description
animate /string/ empty caption Name of a function to use to animate
delay /int/ 0 caption Delay of the animation start
length /int/ 300 caption Animation length
jump /string/ (prev|next) prev-next control Prev/next controls definition
jump-to /int/ (1..n) pages control Pages controls definition
autoplay /bool/ false Slider Autoplay flag, if set to true the slider will change slides every few seconds
interval /int/ 5000 Slider Interval between slides change in miliseconds
transitiontime /int/ 300 Slider Slide change transition time in miliseconds
parallax /bool/ false Slider When set to true script will move background of [data-group="slides"] element
parallax-distance /float/ (1/10) Slider Distance for the background to move compared to slide move distance
parallax-direction /float/ 1 Slider 1 or -1 to switch default direction


Responsive slider exposes 3 methods: prev, next and jump:

Name Example Description
Changes slide to previous one
Changes slide to next one
Jumps directly to selected slide
Starts autoplay
Stops autoplay


There are 4 callback functions avaliable in Responsive Slider:

Name Description
onSlideChange Run after slide was changed
onSlideNext Run before slide changes to next
onSlidePrev Run before slide changes to previous
onSlidePageChange Run before slide changes
onInit Run on slider initialization

Callbacks can be set on slider javascript init:

$( document ).ready( function() {
    onSlideChange: function() { console.log(this) }
What is important here that thru this you can access slider object that gives you access to every internal function and variable. For example:
$( document ).ready( function() {
    onSlideChange: function() {
Will display current slide number.


Responsive Slider provides few basic animation functions:

  • slideAppearRightToLeft
  • slideAppearLeftToRight
  • slideAppearUpToDown
  • slideAppearDownToUp

Here is the example of animation function:

slideAppearLeftToRight: function($caption, delay, length) {
  var animate, css;
  if (delay == null) {
    delay = 0;
  if (length == null) {
    length = 300;
  css = {
    'margin-left': -100,
    'margin-right': 100
  animate = function() {
    css = {
      'margin-left': 0,
      'margin-right': 0,
      'opacity': 1
    return $caption.animate(css, length);
  if (delay > 0) {
    return setTimeout(animate, delay);
  } else {
    return animate();

Standard animation functions assume that the caption element will be positioned absolutely and they do move animations by changing margins.

You can add your own animations by adding (or editing) animations functions to $.fn.responsiveSlider.animations object.


No topics here yet


Report an issue


  • Captions are also animated on load
  • Added onInit callback

v0.9 Important!

  • ! Resolved long lasting issue with slider area wouldn't allow to scroll the page.
  • Added stop and start autoplay methods.
  • Inside callback function this represents slider object that gives access to every internal function and variable. Probably should work that way from the beginning.


  • Changed slider animation base from „scroll left” to „relative right”.
  • Some Twitter Bootstrap 3 compatibility changes.


  • Fixed bug in paralax example.


  • Fixed bug that caused slider not to stop auto-slide after swipe.


  • Added parallax slider mode.
  • Added options: parallax, parallaxDistance, parallaxDirection options.
  • Few minor improvements and some code refactoring.


  • Fixed bug that caused slider to stop between slides.
  • Added moveDistanceToSlideChange option.


  • Fixed bug that caused captions to animate when clicked on the current page indicator.


  • Fixed bug that caused, in some cases, wrong slide to show on script initialization.
  • Autoplay now permanently stops on swipe event.
  • Removed touch surface element as redundant.
  • Added touch option allowing to disable all touch/swipe slider functionality.


  • Fixed issues with slide change smoothness on some devices.


  • Fixed bug where animations where stacked up and run in an unpredictable manner.
  • Fixed bug that caused animations to run when slide was returning to it's normal position.


  • Responsive Slider/Carousel release.