![]() |
||
Simple Slider, a minimalist javascript sliderIntroductionSimpleSlider.js is a light library to add slider widgets to your web apps. It's only horizontal and can be easily customised.This Library is under BSD, so you can redistribute it and/or modify it under the terms of the BSD License. Any sugestions or questions are wellcome on our email : contact@revolunet.com Enjoy ;) Features listUseJust copy SimpleSlider.js into your Site's folder, add a reference to the library in your page and declare your slider(s) in your onLoadSimpleSlider(divID, width, height, bgcolor="silver", fgcolor="#666666") // declare a slider, which will be positionned in divID, width px long, height px height, colors optionnals
SimpleSlider.position // float between 0 and 1 for the thumb position
SimpleSlider.onNewPosition // trigger your own function when the position change
SimpleSlider.setPosition(float) // receives a float between 0 and 1 and places the thumb on the slider at desired position
SimpleSlider.thumb.dragging // allows you to check if the thumb is currently being dragged or not (dropped)
Examples :a basic horizontal sliderPosition : 0 another basic horizontal slider, with custom colors Position : 0
Licence :The code is under BSD, so you can redistribute it and/or modify it under the terms of the BSD License.DownloadCommentaires | ||