components-bootstrap-touchspin.js
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
var ComponentsBootstrapTouchSpin = function() {
var handleDemo = function() {
$("#touchspin_1").TouchSpin({
min: 0,
max: 100,
step: 0.1,
decimals: 2,
boostat: 5,
maxboostedstep: 10,
postfix: '%'
});
$("#touchspin_2").TouchSpin({
min: -1000000000,
max: 1000000000,
stepinterval: 50,
maxboostedstep: 10000000,
prefix: '$'
});
$("#touchspin_3").TouchSpin({
verticalbuttons: true
});
$("#touchspin_4").TouchSpin({
verticalbuttons: true,
verticalupclass: 'glyphicon glyphicon-plus',
verticaldownclass: 'glyphicon glyphicon-minus'
});
$("#touchspin_5").TouchSpin();
$("#touchspin_6").TouchSpin({
initval: 40
});
$("#touchspin_7").TouchSpin({
initval: 40
});
$("#touchspin_8").TouchSpin({
postfix: "a button",
postfix_extraclass: "btn red"
});
$("#touchspin_9").TouchSpin({
postfix: "a button",
postfix_extraclass: "btn green"
});
$("#touchspin_10").TouchSpin({
prefix: "pre",
postfix: "post"
});
$("#touchspin_11").TouchSpin({
buttondown_class: "btn blue",
buttonup_class: "btn red"
});
}
return {
//main function to initiate the module
init: function() {
handleDemo();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapTouchSpin.init();
});