dev-master
9999999-dev http://geersch.github.io/bootstrap-spinedit/A spin edit control for Twitter Bootstrap.
Apache 2.0
by Lucas Zardo
css bootstrap javascript spin
Wallogit.com
2017 © Pedro Peláez
A spin edit control for Twitter Bootstrap.
, (*1)
A spin edit control for Twitter Bootstrap., (*2)
Tested with version 2.2.1., (*3)
Click here for a live demo., (*4)
This component relies on Twitter Bootstrap and jQuery., (*5)
Basic usage:, (*6)
<link rel="stylesheet" type="text/css" href="bootstrap.css" /> <link rel="stylesheet" type="text/css" href="bootstrap-spinedit.css" /> <input type="text" id="spinEdit" />
You can use the following additional options to modify the behaviour of the spin edit control:, (*7)
For example:, (*8)
<link rel="stylesheet" type="text/css" href="bootstrap.css" /> <link rel="stylesheet" type="text/css" href="bootstrap-spinedit.css" /> <input type="text" id="spinEdit" />
setValue, (*9)
Set the value of the spin edit., (*10)
$('#spinEdit').spinedit('setValue', 100);
setMinimum, (*11)
Set the minimum allowed value of the spin edit., (*12)
$('#spinEdit').spinedit('setMinimum', -10000);
setMaximum, (*13)
Set the maximum allowed value of the spin edit., (*14)
$('#spinEdit').spinedit('setMaximum', 10000);
setStep, (*15)
Set the step, by which the value of the spin edit is increased / decreased., (*16)
$('#spinEdit').spinedit('setStep', 100);
increase, (*17)
Increase the value of the spin edit with the value defined by its step property., (*18)
$('#spinEdit').spinedit('increase');
decrease, (*19)
Decrease the value of the spin edit with the value defined by its step property., (*20)
$('#spinEdit').spinedit('decrease');
setNumberOfDecimals, (*21)
Sets the number of allowed decimals., (*22)
$('#spinEdit').spinedit('setNumberOfDecimals', 2);
The spin edit supports one event, namely valueChanged. This event is triggered when its value changes., (*23)
The event object has one additional property:, (*24)
$('#spinEdit').on("valueChanged", function (e) {
console.log(e.value);
});
This code is made available under the Apache License v2.0, the same as Twitter Bootstrap., (*25)
A spin edit control for Twitter Bootstrap.
Apache 2.0
css bootstrap javascript spin