jquery.slideControl.js
jquery.slideControl.js is a lightweight, responsive, jQuery based slide control plugin which supports snapping into steps and includes callback functionality.
Demo
http://borisdiakur.github.io/jquery.slideControl.js/
Browser Support
Tested with jQuery v1.9.1 on IE6+ and all major desktop and mobile browsers.
Usage
Install with bower
bower install jquery.slidecontrol.js --save
Or just download
jquery.slideControl.js 10KB
jquery.slideControl.min.js 4.7KB (1.5KB Gzip)
Now check out the demo source code. Use either step-wise slider options and API or current relative position option and relative position API - do not try to use both on the same slide control. Put the slide control into a container. Set position, width and background image of the slide control by setting the according css on the container.
Initialization Options
currentRelativePosition(default 0)steps(defaultundefinded)currentStep(default 0)onStart(defaultfunction() {})onChanged(defaultfunction() {})onTargetSnapPositionChanged(defaultfunction() {})onComplete(defaultfunction() {})
API
slideToStep(Number)
Only argument should be an integer (starting from 0).
slideToRelativePosition(Number)
Only argument should be a float between 0 (slide left) and 1 (slide right).
License
WTFPL License (http://wtfpl.org/)
Copyright © 2013 Boris Diakur