npm.io
1.0.0 • Published 11 years ago

birdie.js

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

birdie.js

Bower version npm version Build Status

Data-list attribute implementation for input of type range
Demo


Getting Started

You may install birdie.js using package managers, or download project archive.
Installing via bower will bring in the dependencies as well.

bower install birdie.js
npm install birdie.js

# birdie.min.js           minified version of birdie.js

Usage

var birds = new Birdie(document.querySelector('form'), {
    selector: "",
    enumerate: false
});
Options Description Default Type
selector One or more CSS selectors separated by commas "" string
enumerate Enumerate list output false boolean
Example

Add data-list attribute to input elements of type text. A range type element will be inserted before each match.

<input type="text" class="foobar" name="birds" readonly data-list="…"; />
<!-- readonly attribute is recommended -->

JS The first argument should be the form, or a parent element.

var birds = new Birdie(document.querySelector('form'), {
    selector: '.foobar', // one or more CSS selectors separated by commas
    enumerate: true
});

License

This software is free to use under the MIT license.