ZSlider
A pure JavaScript Carousel/Slider plugin that works well at Mobile/PC
Install / Use
/learn @creeperyang/ZSliderREADME
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 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.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
