-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (85 loc) · 2.48 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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>select-sync Test Page</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css">
<style>
body{
padding: 20px 40px;
}
select{
width: 200px;
margin-top: 20px;
display: block;
}
</style>
</head>
<body>
<h1>Testing select-sync</h1>
<h3>Disable Selected</h3>
<select class="sync-disable-selected">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<select class="sync-disable-selected">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<select class="sync-disable-selected">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<h3>Sync Selected</h3>
<select class="sync-selected">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<select class="sync-selected">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<select class="sync-selected">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!--
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
-->
<script src="src/select-sync.js"></script>
<script type="text/javascript">
$('select.sync-disable-selected').selectSync('disableSelected', {
beforeSync: function(selects){
console.log('beforeSync');
},
afterSync: function(selects){
console.log('afterSync');
}
});
$('select.sync-selected').selectSync('selected', {
beforeSync: function(selects){
console.log('beforeSync');
},
afterSync: function(selects){
console.log('afterSync');
}
});
</script>
</body>
</html>