Giter Club home page Giter Club logo

zslider's Introduction

zSlider

A pure JavaScript Carousel/Slider plugin that works well at Mobile/PC.

Getting Started

This plugin wrote in pure JavaScript and has no dependencies like jQuery.

Install the plugin via bower

bower install zSlider --save

Once the plugin has been installed, you can use it easily:

Usage

Overview

You can just generate a slider with one line:

var slider = new Slider('#slider1', '.z-slide-item');
<div class="z-slide-wrap top" id='slider1'>
    <ul class="z-slide-content">
        <li class="z-slide-item"></li>
        <li class="z-slide-item"></li>
        <li class="z-slide-item"></li>
    </ul>
</div>

Options

When init with new Slider(container, slideItems, option);, a optional config can be used. What can be config?

var option = {
    'current': 0, // which to show when init
    'duration': 0.8, // animation duration, seconds
    'minPercentToSlide': null, // percent to decide to slide
    'autoplay': true, // autoplay?
    'direction': 'left', // autoplay direction
    'interval': 5 // seconds
};

Usage Examples

There is a built-in demo:

git clone [email protected]:creeperyang/zSlider.git
cd zSlider
npm install
grunt serve

Release History

2015-04-30    v0.0.1    init

License

Copyright (c) 2015 creeperyang. Licensed under the MIT license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.