-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
105 lines (92 loc) · 2.47 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery UI Multi-Select Widget</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="jquery-ui.multi-select.js"></script>
<style>
select[multiple] {
min-width: 12em;
min-height: 12em;
}
</style>
<script>
$( document ).ready(function() {
$('.enhanced').multiselect();
$('.enhanced2').multiselect({
toLeftText: "<-",
toRightText: "->",
change: function() {
alert("things changed");
}
});
});
</script>
</head>
<body>
<section>
<h1>Original</h1>
<select multiple>
<optgroup label="Group 1">
<option>Option 1.1</option>
</optgroup>
<optgroup label="Group 2">
<option selected>Option 2.1</option>
<option>Option 2.2</option>
</optgroup>
<optgroup label="Group 3" disabled>
<option>Option 3.1</option>
<option>Option 3.2</option>
<option>Option 3.3</option>
</optgroup>
</select>
</section>
<section>
<h1>Enhanced</h1>
<form>
<select class="enhanced" name="multiselect[]" multiple>
<optgroup label="Group 1">
<option>Option 1.1</option>
</optgroup>
<optgroup label="Group 2">
<option selected>Option 2.1</option>
<option>Option 2.2</option>
</optgroup>
<optgroup label="Group 3" disabled>
<option>Option 3.1</option>
<option>Option 3.2</option>
<option>Option 3.3</option>
</optgroup>
</select>
<br />
<select class="enhanced" name="multiselect_2[]" multiple>
<optgroup label="Group 1">
<option>Option 1.1</option>
</optgroup>
<optgroup label="Group 2">
<option selected>Option 2.1</option>
<option>Option 2.2</option>
</optgroup>
<optgroup label="Group 3">
<option>Option 3.1</option>
<option disabled>Option 3.2</option>
<option>Option 3.3</option>
</optgroup>
</select>
<h2>Custom 'on change'</h2>
<select class="enhanced2" name="multiselect_custom[]" multiple>
<option>Option 1.1</option>
<option>Option 2.1</option>
<option>Option 2.2</option>
<option disabled>Option 3.1</option>
<option>Option 3.2</option>
<option>Option 3.3</option>
</select>
<br />
<input type="submit" name="process" />
</form>
</section>
</body>
</html>