-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
115 lines (113 loc) · 4.41 KB
/
index.html
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="ru-RU">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="author" content="//vk.com/tishukn">
<link rel="stylesheet" href="demo/prism.css">
<link rel="stylesheet" type="text/css" href="demo/style.css">
<meta name="description" content="Simple and easy Input Spinner">
<title>INumber Demo</title>
</head>
<body><!--[if lte IE 9]>
<p class="browsehappy">Вы используете <strong>устаревший</strong> браузер. Пожалуйста <a href="//browsehappy.com/" target="_blank">обновите ваш браузер</a> чтобы воспользоваться всем функционалом сайта.</p><![endif]-->
<div class="container">
<div class="header text-center">
<div class="row">
<h1>INumber Demo</h1>
<p>Simple and easy Input Spinner</p>
</div>
<p><a href="https://github.com/rainjeck/inumber">GitHub</a></p>
</div>
<div class="block text-center">
<div class="row">
<div id="inumber">
<input type="text">
</div>
</div>
<div class="row">
<button class="button js-set-btn" id="setValue" type="button">Set Value 2</button>
</div>
<div class="row">
<button class="button js-set-btn" id="setMin" type="button">Set Min 10</button>
</div>
<div class="row">
<button class="button js-set-btn" id="setMax" type="button">Set Max 15</button>
</div>
<div class="row">
<button class="button js-set-btn" id="setStep" type="button">Set Step 2</button>
</div>
<div class="row"><hr></div>
<div class="row">
<div id="inumber-float">
<input type="text" step="0.1" value="0.2" min="0.1" max="2.5">
</div>
</div>
<div class="row">
<button class="button js-set-btn" id="setValueFloat" type="button">Set Value 0.5</button>
</div>
<div class="row">
<button class="button js-set-btn" id="setMinFloat" type="button">Set Min 1.2</button>
</div>
<div class="row">
<button class="button js-set-btn" id="setMaxFloat" type="button">Set Max 1.5</button>
</div>
</div>
<div class="block">
<div class="row">
<h3 class="title"><strong>Usage:</strong></h3>
<div class="title">HTML:</div>
</div>
<div class="row">
<pre class="language-markup"><code><div id='inumber'>
<input type='text' />
</div>
</code></pre>
</div>
</div>
<div class="block">
<p>You can use attributes:</p>
<pre class="language-markup"><code><div id='inumber'>
<input type='text' min='1' max='10' step='1' value='2' />
</div>
<div id='inumber-float'>
<input type='text' step='0.1' value='1.2' min='0.1' max='1.5' />
</div>
</code></pre>
</div>
<div class="block">
<div class="title">JavaScript:</div>
<pre class="language-javascript"><code>var inumber = new INumber.default("#inumber", {
decreaseText: '-',
increaseText: '+',
float: false,
decimals: 0,
locale: '', // navigator.language as default or Intl
inputPosition: "between", <span>// between, left, right</span>
init: function(instance) { ... },
change: function(value, formatValue, el, id) { ... }
});
// Method:
inumber.setValue(2);
inumber.setMin(10);
inumber.setMax(12);
</code></pre>
</div>
<div class="block">
<div class="title">CSS Classes and generating layout:</div>
<pre class="language-markup"><code><div id='inumber' class='inumber'>
<button type='button' class='inumber-button is-decrease'>-</button
<input type='number' class='inumber-input' />
<button type='button' class='inumber-button is-increase'>+</button>
</div>
</code></pre>
</div>
</div>
<script src="demo/prism.js"></script>
<script src="dest/inumber.js"></script>
<script src="demo/script.js"></script>
</body>
</html>