Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.76 KB

README.md

File metadata and controls

38 lines (30 loc) · 1.76 KB

bootstrap-number-incrementer

A jQuery/Boostrap based widget for use on text and number inputs to turn them into Bootstrap input groups with plus and minus buttons for incrementing and decrementing the input's numeric value.

screenshot

dependencies

installation

bower install bootstrap-number-incrementer
npm install bootstrap-number-incrementer

html

Download the code, link it in your HTML file (after dependencies).

<script src="/path/to/bootstrap-number-incrementer.js"></script>

usage

###options

Option Description Default Note
width_factor How to maintain the width of the widget. 'dynamic' dynamic changes the width as the length of the input's value changes, and center-aligns the text. range sets the width based on the maximum possible length of value (determined by the input's min and max attributes) and right-aligns the text. Any other value tells the widget to avoid dealing with width (you can control it yourself by CSS or other means).
input_class Additional class(es) to add to the input element null Whitespace separated list
wrapper_class Additional class(es) to add to the element that is wrapped around the widget null Whitespace separated list
incrementer_class Additional class(es) to add to the increment (+) button null Whitespace separated list
decrementer_class Additional class(es) to add to the decrement (-) button null Whitespace separated list