jQuery Anyslider

A jQuery plugin which allows you to create a slider for any kind of content.

View the Project on GitHub

Getting started

1. Include jQuery and AnySlider

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="jquery.anyslider.js"></script>

2. Add some markup

<div class="slider">


        The first slide.



        Another slide.



        And so on.



3. Initialize Anyslider

// Without any options

// With options
    // Options here

4. Add the four lines of required CSS.

.slider {
    overflow: auto;
    position: relative;
    -ms-touch-action: pan-y;
    touch-action: pan-y;





As of 2.0.0 AnySlider features a simple API to interact with the slider.

var slider = $('.slider').anyslider();
var anyslider = slider.data('anyslider');

anyslider.goTo(3); // Go to slide number 3

Complete list of API methods