https://github.com/creeperyang/zslider
A pure JavaScript Carousel/Slider plugin that works well at Mobile/PC
https://github.com/creeperyang/zslider
carousel slider
Last synced: 8 months ago
JSON representation
A pure JavaScript Carousel/Slider plugin that works well at Mobile/PC
- Host: GitHub
- URL: https://github.com/creeperyang/zslider
- Owner: creeperyang
- Created: 2015-04-30T03:27:11.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-13T00:56:07.000Z (almost 10 years ago)
- Last Synced: 2025-10-13T02:58:32.163Z (8 months ago)
- Topics: carousel, slider
- Language: JavaScript
- Size: 145 KB
- Stars: 12
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```shell
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:
```js
var slider = new Slider('#slider1', '.z-slide-item');
```
```html
```
### Options
When init with `new Slider(container, slideItems, option);`, a optional config can be used. What can be config?
```js
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:
```shell
git clone git@github.com: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.