1.0.0 • Published 9 years ago

birdie.js v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

birdie.js

Bower version npm version Build Status

A data-list attribute implementation for type-range input. ( pseudo polyfill ) 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
});
OptionsDescriptionDefaultType
selectorOne or more CSS selectors separated by commas""string
enumerateEnumerate list outputfalseboolean

Example

Add data-list attribute to input type-text elements. An input type-range will be inserted before each matched element.

<input type="text" class="birds" 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: '.birds', // class name matching the input type-text element(s)
    enumerate: true
});

License

This software is free to use under the MIT license.

1.0.0

9 years ago