-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
34 lines (34 loc) · 1.11 KB
/
Copy pathtest.html
File metadata and controls
34 lines (34 loc) · 1.11 KB
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
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<meta content="width=device-width" name="viewport">
<meta content="Accessible custom `<select>` (and `<input list>`) element." name="description">
<title>Option Picker</title>
<link href="index.min.css" rel="stylesheet">
<style>
.option-picker__options {
background: #fff;
}
</style>
</head>
<body>
<main>
<p><select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select></p>
</main>
<script src="index.min.js"></script>
<script>
const picker = new OptionPicker(document.querySelector('select'));
picker.on('max.options', function (count, max) {
console.error('The maximum number of options to select is ' + max + ', your current selection is ' + count + '.');
});
picker.on('min.options', function (count, min) {
console.error('The minimum number of options to select is ' + min + ', your current selection is ' + count + '.');
});
</script>
</body>
</html>