-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
123 lines (116 loc) · 4.66 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
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html>
<head>
<title>autoTab Demos</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
a.git, a.author {
font-weight: 300;
line-height: 150%;
text-decoration: none;
position: fixed;
top: 0;
right: 0;
font-size: 13px;
line-height: 13px;
font-weight: 400;
color: black;
background: white;
-webkit-font-smoothing: subpixel-antialiased;
}
a.git {
padding: 10px 20px;
}
a.author {
padding: 10px 170px 10px 16px;
}
a.git:hover, a.author:hover {
background: #c95a5d;
color: #FFFFFF;
}
</style>
</head>
<body>
<div class="container">
<h1>autoTab Demos</h1>
<div class="form-group">
<label for="firstCombination">data-tab="0" & data-length="5" & data-upper="true"</label>
<input name="firstCombination" id="firstCombination" type="text" data-tab="true" data-order="0" data-length="5" data-upper="true" class="form-control">
</div>
<div class="form-group">
<label for="secondCombination">data-tab="1" & data-length="4"</label>
<input name="secondCombination" id="secondCombination" type="text" data-tab="true" data-order="1" data-length="4" class="form-control">
</div>
<div class="form-group">
<label for="sevenCombination">data-tab="6" & data-length="6" & data-nospace="true"</label>
<input name="sevenCombination" id="sevenCombination" type="text" data-tab="true" data-order="6" data-length="6" data-nospace="true" class="form-control">
</div>
<div class="form-group">
<label for="thirdCombination">data-tab="2" & data-length="5" & disabled="disabled"</label>
<input name="thirdCombination" id="thirdCombination" type="text" data-tab="true" data-order="2" data-length="5" disabled="disabled" class="form-control">
</div>
<div class="form-group">
<label for="fifthCombination">data-tab="4" & data-length="5" & data-format="custom" & data-pattern="[^0-9\.]"</label>
<input name="fifthCombination" id="fifthCombination" type="text" data-tab="true" data-order="4" data-length="5" data-format="custom" data-pattern="[^0-9\.]" class="form-control">
</div>
<div class="form-group">
<label for="fourthCombination">data-tab="9" & data-length="5" & data-format="numeric"</label>
<input name="fourthCombination" id="fourthCombination" type="password" data-tab="true" data-order="9" data-length="5" data-format="numeric" class="form-control">
</div>
<div class="form-group">
<label>data-tab="7"</label>
<select class="form-control" data-tab="true" data-order="7">
<option>First</option>
<option>Second</option>
<option>Third</option>
</select>
</div>
<div class="form-group">
<label for="textarea">data-tab="8" & data-length="4"</label>
<textarea name="txtDescription" cols=10 rows=3 data-tab="true" data-order="8" data-length="4" class="form-control"></textarea>
</div>
<div class="form-group">
<label for="sixthCombination">data-tab="5" & data-length="8"</label>
<input name="sixthCombination" id="sixthCombination" type="text" data-tab="true" data-order="5" data-length="8" class="form-control">
</div>
<div class="form-group">
<label>data-tab="3"</label>
<button type="button" class="btn btn-info" data-tab="true" data-order="3">Button</button>
</div>
<button type="button" class="btn btn-success" onclick="restore()">Restore autoTab</button>
<button type="button" class="btn btn-danger" onclick="destroy()">Destroy autoTab</button>
</div>
<a class="author" target="_blank" href="http://djhvscf.github.io/Blog/">Author website</a>
<a class="git" target="_blank" href="https://github.com/djhvscf/autoTab">Download at GitHub</a>
<script src="src/autoTab.js"></script>
<script>
var autoTab;
(function() {
autoTab = new autoTab({autoFocus: 1, onComplete: oncomp, cleanValuesOnRestart: true});
})();
function destroy() {
try {
if(autoTab) {
autoTab.destroy();
}
} catch(ex) {
console.log('error');
}
}
function restore() {
try {
if(autoTab) {
autoTab.restore();
}
} catch(ex) {
console.log('error');
}
}
function oncomp() {
console.log('completed');
}
</script>
</body>
</html>