-
Notifications
You must be signed in to change notification settings - Fork 31
/
sample.html
58 lines (52 loc) · 1.53 KB
/
sample.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
<!DOCTYPE html>
<html class="no-js" lang='en'>
<head>
<title>Sample bootstrap-switch</title>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
body {
padding-top: 2em;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-3">
<form>
<fieldset>
<div class="form-group">
<label class="control-label">Before:</label>
<input class="form-control" type="number" value="1" min="1" max="10" />
</div>
<div class="form-group">
<label class="control-label">After:</label>
<input id="after" class="form-control" type="number" value="1" min="1" max="10" />
</div>
<div class="form-group">
<label class="control-label">Colorful:</label>
<input id="colorful" class="form-control" type="number" value="1" min="1" max="10" />
</div>
</fieldset>
</form>
</div>
</div>
</div>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.min.js" ></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" ></script>
<script src="bootstrap-number-input.js" ></script>
<script>
// Remember set you events before call bootstrapSwitch or they will fire after bootstrapSwitch's events
$("[name='checkbox2']").change(function() {
if(!confirm('Do you wanna cancel me!')) {
this.checked = true;
}
});
$('#after').bootstrapNumber();
$('#colorful').bootstrapNumber({
upClass: 'success',
downClass: 'danger'
});
</script>
</body>
</html>