This repository has been archived by the owner on Apr 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
113 lines (94 loc) · 2.13 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
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html>
<head>
<meta charset='utf8'>
<title>select-reflect</title>
<link rel='stylesheet' href='build/build.css'>
<script src='build/build.js'></script>
<style>
body {
padding: 50px;
font-family: 'Helvetica Neue', 'Lucida Grande', sans-serif;
font-size: 12px;
font-weight: 300;
}
.select {
max-width: 300px;
margin-top: 30px;
}
.select .select-option.highlight {
color: rgb(63, 191, 191);
}
.select .select-option:hover {
color: rgb(63, 191, 191);
}
.select .pillbox li {
background: #fff;
padding: 2px 6px;
font-size: 11px;
border: 1px solid #ddd;
margin: 3px;
}
.select .pillbox li a {
color: rgb(63, 191, 191);
text-decoration: none;
padding: 0 0 0 6px ;
}
*[hidden] {
display: none !important;
}
.select-dropdown input {
border: 0 none;
display: block;
border-bottom: 1px solid #ddd;
padding: 6px;
width: 100%;
}
input:focus {
outline: 0;
}
section {
margin: 0 0 80px 0;
vertical-align: middle;
}
.select {
display: block;
width: 150px;
}
select {
display: block;
display: inline-block;
vertical-align: top;
width: 150px;
}
</style>
</head>
<body>
<section>
<select>
<option>Select a language...</option>
<option value='js'>Javascript</option>
<option value='go'>Google Go</option>
<option value='lua'>Lua</option>
</select>
</section>
<section>
<select multiple>
<option>Select languages...</option>
<option value='js'>Javascript</option>
<option value='go'>Google Go</option>
<option value='lua'>Lua</option>
</select>
</section>
<script>
var els = document.querySelectorAll('select');
var reflect = require('select-reflect');
var select = require('select');
var each = require('each');
each(els, function(nativ){
el = reflect(nativ, select()).el;
nativ.parentNode.insertBefore(el, nativ.nextSibling);
})
</script>
</body>
</html>