1
- # [ jQuery Spinner] ( https://vsn4ik.github.io/jquery. spinner/ )
1
+ # [ Input Spinner] ( https://vsn4ik.github.io/input- spinner/ )
2
2
3
3
[ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( LICENSE )
4
- [ ![ Build Status] ( https://github.com/vsn4ik/jquery. spinner/workflows/Test/badge.svg )] ( https://github.com/vsn4ik/jquery. spinner/actions?workflow=Test )
5
- [ ![ devDependency Status] ( https://david-dm.org/vsn4ik/jquery. spinner/dev-status.svg )] ( https://david-dm.org/vsn4ik/jquery. spinner?type=dev )
4
+ [ ![ Build Status] ( https://github.com/vsn4ik/input- spinner/workflows/Test/badge.svg )] ( https://github.com/vsn4ik/input- spinner/actions?workflow=Test )
5
+ [ ![ devDependency Status] ( https://david-dm.org/vsn4ik/input- spinner/dev-status.svg )] ( https://david-dm.org/vsn4ik/input- spinner?type=dev )
6
6
7
7
8
- A Number-Spinner based-on jQuery , Support Keyboard operations and continuous changing.
8
+ A Number-Spinner, Support keyboard operations and continuous changing.
9
9
10
10
## Basic usage, it's very simple
11
11
``` html
12
12
<!-- // ref javascript file -->
13
- <script src =" dist/js/jquery. spinner.js" ></script >
13
+ <script src =" dist/input- spinner.js" ></script >
14
14
15
15
<!-- // spinner plugin DOM -->
16
16
<div data-trigger =" spinner" >
@@ -27,16 +27,16 @@ In your web page:
27
27
28
28
``` html
29
29
<script src =" jquery.js" ></script >
30
- <script src =" dist/js/jquery. spinner.js" ></script >
30
+ <script src =" dist/input- spinner.js" ></script >
31
31
<script >
32
- $ ( " #spinner" )
33
- .spinner (' delay' , 200 ) // delay in ms
34
- .spinner (' changed' , function (e , newVal , oldVal ) {
35
- // trigger lazed, depend on delay option.
36
- })
37
- .spinner (' changing' , function (e , newVal , oldVal ) {
38
- // trigger immediately
39
- });
32
+ $ ( ' #spinner' )
33
+ .spinner (' delay' , 200 ) // delay in ms
34
+ .spinner (' changed' , function (e , newVal , oldVal ) {
35
+ // trigger lazed, depend on delay option.
36
+ })
37
+ .spinner (' changing' , function (e , newVal , oldVal ) {
38
+ // trigger immediately
39
+ });
40
40
</script >
41
41
42
42
<div data-trigger =" spinner" id =" spinner" >
@@ -89,10 +89,10 @@ Usage:
89
89
90
90
## Examples
91
91
92
- ### Work with Bootstrap 3 and Font Awesome 4
92
+ ### Work with Bootstrap and Font Awesome
93
93
94
94
``` html
95
- <link href =" dist/css/bootstrap -spinner.css" rel =" stylesheet" >
95
+ <link href =" dist/input -spinner.css" rel =" stylesheet" >
96
96
97
97
<div class =" input-group spinner" data-trigger =" spinner" >
98
98
<input type =" text" class =" form-control text-center" value =" 1" data-rule =" quantity" >
@@ -125,7 +125,7 @@ Usage:
125
125
</div >
126
126
127
127
<script >
128
- $ (" #spinner" ).spinner (' changing' , function (e , newVal , oldVal ) {
128
+ $ (' #spinner' ).spinner (' changing' , function (e , newVal , oldVal ) {
129
129
$ (' #spinner-value' ).html (newVal);
130
130
});
131
131
</script >
@@ -134,7 +134,7 @@ Usage:
134
134
#### pass step options as a function
135
135
``` javascript
136
136
// To skip 0
137
- $ (" #spinner" ).spinner ({
137
+ $ (' #spinner' ).spinner ({
138
138
step : function (dir ) {
139
139
// 'this' references to the spinner object
140
140
if ((this .oldValue === 1 && dir === ' down' ) || (this .oldValue === - 1 && dir === ' up' )) {
@@ -145,7 +145,7 @@ $("#spinner").spinner({
145
145
});
146
146
147
147
// or use API syntax
148
- $ (" #spinner" ).spinner (' step' , function (dir ) {
148
+ $ (' #spinner' ).spinner (' step' , function (dir ) {
149
149
// your logic here
150
150
});
151
151
```
@@ -158,6 +158,6 @@ Copyright xixilive, 2013–2015
158
158
159
159
Licensed under [ the MIT License] [ license ] .
160
160
161
- [ license ] : https://github.com/vsn4ik/jquery. spinner/blob/master/LICENSE
162
- [ development ] : https://raw.githubusercontent.com/vsn4ik/jquery. spinner/master/dist/js/jquery. spinner.min.js
163
- [ production ] : https://raw.githubusercontent.com/vsn4ik/jquery. spinner/master/dist/js/jquery. spinner.js
161
+ [ license ] : https://github.com/vsn4ik/input- spinner/blob/master/LICENSE
162
+ [ development ] : https://raw.githubusercontent.com/vsn4ik/input- spinner/master/dist/input- spinner.min.js
163
+ [ production ] : https://raw.githubusercontent.com/vsn4ik/input- spinner/master/dist/input- spinner.js
0 commit comments