forked from o-sam-o/jquery.select2Buttons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (101 loc) · 3.43 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
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="jQuery.select2Buttons.js"></script>
<link rel="stylesheet" type="text/css" href="select2Buttons.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>jQuery Select 2 Buttons Plugin</title>
</head>
<body>
<h1>Select 2 Buttons JQuery Plugin</h1>
<p>
This is a demo page for the Select2Buttons jQuery plugin. Which
provides an alternative way of displaying standard HTML selects.
<br>
<a href="https://github.com/o-sam-o/jquery.select2Buttons">The documentation and source is available here.</a>
</p>
<form method="GET">
<p>
<label for="simple-select">Simple Select:</label>
<select name="simple-select" class="standard-demo">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</p>
<p>
<label for="preselected-select">Preselected Select:</label>
<select name="preselected-select" class="standard-demo">
<option>One</option>
<option selected="selected">Selected</option>
<option>Three</option>
</select>
</p>
<p>
<label for="disabled-option-select">Disabled Option Select:</label>
<select name="disabled-option-select" class="standard-demo">
<option>One</option>
<option disabled="disabled">Disabled</option>
<option>Three</option>
</select>
</p>
<p>
<label for="disabled-select">Disabled Select:</label>
<select name="disabled-select" disabled="true" class="standard-demo">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</p>
<p>
<label for="js-callback-select">JS Callback Select:</label>
<select name="js-callback-select" class="standard-demo">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</p>
<p>
<label for="no-default-select">No Default Select:</label>
<select name="no-default-select">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</p>
<p>
<label for="opt-group-select">Opt Group Select:</label>
<select name="opt-group-select" class="standard-demo">
<optgroup label="Numbers">
<option>One</option>
<option>Two</option>
<option>Three</option>
</optgroup>
<optgroup label="Colours">
<option>Red</option>
<option>Blue</option>
<option>Green</option>
</optgroup>
</select>
</p>
<p>
<label for="multi-select">Multiselect:</label>
<select name="multi-select" multiple="multiple" class="standard-demo">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</p>
<p>
<input type="submit"/>
</p>
</form>
<script>
$('.standard-demo').select2Buttons();
$('select[name=js-callback-select]').change(function() {
alert('Changed to ' + $(this).val());
});
$('select[name=no-default-select]').select2Buttons({noDefault: true});
</script>
</body>
</html>