forked from taufik-nurrohman/tag-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtag-picker.disabled.html
39 lines (34 loc) · 1004 Bytes
/
tag-picker.disabled.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
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<meta content="width=device-width" name="viewport">
<title>Tag Picker</title>
<link href="tag-picker.min.css" rel="stylesheet">
<style>
.tag-picker-source[disabled] + .tag-picker {
background-color: #eee;
border-color: #999;
}
.tag-picker-source[disabled] + .tag-picker .tag[title] {
background-color: #aaa;
}
</style>
</head>
<body>
<form method="get" target="_blank">
<p><input disabled name="tags" type="text" value="foo, bar"></p>
<p>
<label>
<input onchange="picker.source.disabled = !this.checked; picker.pop(); picker = new TP(picker.source);" type="checkbox">
<span>Enable</span>
</label>
</p>
<p><button type="submit">Submit</button></p>
</form>
<script src="tag-picker.min.js"></script>
<script>
var picker = new TP(document.querySelector('input'));
</script>
</body>
</html>