Glider - AngularJS slider with no dependencies. Dead simple, < 200 LOC.
Demo is available here: http://evrone.github.io/glider
bower install glider
Add this to your Gemfile
gem 'glider-rails'
and
bundle install
After that you can add the file to sprockets:
//= require glider
Add module as a dependency:
angular.module('myApp', ['glider']);
And then in HTML:
<slider min="21" max="130" value="age"></slider>
To defer value update until mouseup
:
<slider defer_update min="21" max="130" value="age"></slider>
Show value in handle:
<slider show_value_in_handle min="21" max="130" value="age"></slider>
Use increments with snapping:
<slider min="50" max="500" increments="100,200,300,400" value="price"></slider>
To convert the src/glider.coffee
to javascript, use coffeescript compiler.
Install it with:
npm -g install coffee-script
Then compile the file with:
coffee -c -o . --map src/glider.coffee
This will compile the src/glider.coffee to glider.js and generate the source map.
To minify the file I recommend using uglifyjs If you don't have it installed, install it with:
npm -g install uglify-js
Then run the minification with:
uglifyjs glider.js > glider.min.js -mc
-mc
tells uglifier to (m)angle and (c)ompress the input code.
If you don't have node.js installed on your machine, you can create a minified version of the library with online services, such as Google Closure compiler
Please read Code of Conduct and Contributing Guidelines for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
The changelog is here.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License.