Download
Demo
- Overview
- Documents
User Rating: 0/5 ( 0 votes)
Your Rating:
Stepper is a jQuery plugin for cross browser number inputs.
Source: formstone.it
1. INCLUDE JS AND CSS FILES
<script src="jquery.js"></script> <script src="jquery.fs.stepper.js"></script> <link href="jquery.fs.stepper.css" rel="stylesheet">
2. HTML
<input type="number" />
3. JAVASCRIPT
$("input[type='number']").stepper();
4. OPTIONS
Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.
NAME | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
customClass | string | '' | Class applied to instance |
lables.up | string | 'Up' | Up arrow label |
lables.down | string | 'Down' | Down arrow label |
5. METHODS
Methods are publicly available to all active instances, unless otherwise stated.
defaults
Sets default plugin options
$.stepper("defaults", opts);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
opts | object | {} | Options object |
destroy
Removes instance of plugin
$(".target").stepper("destroy");
disable
Disables target instance
$(".target").stepper("disable");
enable
Enables target instance
$(".target").stepper("enable");