Plugins Form Spinner
# jQuery EasyUI Form Plugin - Spinner
* * jQuery EasyUI Plugins](#)
* * *
Extends from $.fn.validatebox.defaults. Overrides the default defaults via $.fn.spinner.defaults.
The spinner combines an editable text box with two small buttons, allowing users to select a value from a range. Similar to the combobox, the spinner allows users to input a value, but it does not have a dropdown list. The spinner is the base component for creating other spinner components (e.g., numberspinner, timespinner, etc.).
## Dependencies
* validatebox
## Usage
The spinner should be created using JavaScript. Creation from markup is not allowed.
$('#ss').spinner({ required:true, increment:10});
## Properties
The properties extend from validatebox, and the following are added for the spinner.
| Name | Type | Description | Default |
| :--- | :--- | :--- | :--- |
| width | number | The width of the component. | auto |
| height | number | The height of the component. This property is available since version 1.3.2. | 22 |
| value | string | The initial value. | |
| min | string | The minimum allowed value. | null |
| max | string | The maximum allowed value. | null |
| increment | number | The increment value when clicking the spinner button. | 1 |
| editable | boolean | Defines if the user can type a value directly into the text field. | true |
| disabled | boolean | Defines if the text field is disabled. | false |
| spin | function(down) | The function called when the user clicks the spin button. The 'down' parameter indicates whether the user clicked the down spin button. | |
## Events
| Name | Parameters | Description |
| :--- | :--- | :--- |
| onSpinUp | none | Fires when the user clicks the up spin button. |
| onSpinDown | none | Fires when the user clicks the down spin button. |
## Methods
The methods extend from validatebox, and the following are added for the spinner.
| Name | Parameters | Description |
| :--- | :--- | :--- |
| options | none | Returns the options object. |
| destroy | none | Destroys the spinner component. |
| resize | width | Resets the width of the component. Pass the 'width' parameter to override the initial width. Code example: $('#ss').spinner('resize'); // resize with original width $('#ss').spinner('resize', 200); // resize with new width |
| enable | none | Enables the component. |
| disable | none | Disables the component. |
| getValue | none | Gets the component value. |
| setValue | value | Sets the component value. |
| clear | none | Clears the component value. |
| reset | none | Resets the component value. This method is available since version 1.3.2. |
* * *
[![Ima
YouTip