-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
200 lines (192 loc) · 9.71 KB
/
index.html
File metadata and controls
200 lines (192 loc) · 9.71 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ChoozeDisplay-js - Basic Usage</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="card mt-5 p-3">
<h1 class="h1">ChoozeDisplay-js - Basic Usage</h1>
</div>
</div>
<!-- Checkbox Input -->
<div class="container mt-3 bg-light p-5 rounded">
<h2 class="mb-3">Choose your favorite Sports:</h2>
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" value="" id="football">
<label class="form-check-label" for="football">Football</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" value="" id="basketball">
<label class="form-check-label" for="basketball">Basketball</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" value="" id="tennis">
<label class="form-check-label" for="tennis">Tennis</label>
</div>
</div>
<!-- Radio Input -->
<div class="container mt-3 bg-light p-5 rounded">
<h2 class="mb-3">Choose your preferred OS:</h2>
<div class="form-check mb-3">
<input class="form-check-input" type="radio" name="os" id="windows" value="windows">
<label class="form-check-label" for="windows">Windows</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input" type="radio" name="os" id="macos" value="macos">
<label class="form-check-label" for="macos">MacOS</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input" type="radio" name="os" id="linux" value="linux">
<label class="form-check-label" for="linux">Linux</label>
</div>
</div>
<!-- Select Input -->
<div class="container mt-3 bg-light p-5 rounded">
<h2 class="mb-3">Select your Favorite Fruit:</h2>
<select class="form-select mb-3" aria-label="Favorite Fruit" id="fruits">
<option selected>Select fruit...</option>
<option value="apple">Apple</option>
<option value="banana">Banana</option>
<option value="orange">Orange</option>
</select>
</div>
<div class="container mt-5 bg-light p-5 rounded">
<div class="alert alert-secondary" id="apple-football-windows-info" style="display:none;">Selecting Apple, and Football is good with Windows.</div>
<div class="alert alert-success" id="apple-football-macos-info" style="display:none;">Selecting Apple, and Football is good with macOS.</div>
<div class="alert alert-danger" id="apple-basketball-windows-info" style="display:none;">Selecting Apple, and Basketball is good with Windows.</div>
<div class="alert alert-warning" id="apple-basketball-macos-info" style="display:none;">Selecting Apple, and Basketball is good with macOS.</div>
<div class="alert alert-info" id="banana-football-windows-info" style="display:none;">Selecting Banana, and Football is good with Windows.</div>
<div class="alert alert-light" id="banana-football-macos-info" style="display:none;">Selecting Banana, and Football is good with macOS.</div>
<div class="alert alert-dark" id="banana-basketball-windows-info" style="display:none;">Selecting Banana, and Basketball is good with Windows.</div>
<div class="alert alert-primary" id="banana-basketball-macos-info" style="display:none;">Selecting Banana, and Basketball is good with macOS.</div>
<div class="alert alert-secondary" id="orange-football-windows-info" style="display:none;">Selecting Orange, and Football is good with Windows.</div>
<div class="alert alert-success" id="orange-football-macos-info" style="display:none;">Selecting Orange, and Football is good with macOS.</div>
<div class="alert alert-danger" id="orange-basketball-windows-info" style="display:none;">Selecting Orange, and Basketball is good with Windows.</div>
<div class="alert alert-warning" id="orange-basketball-macos-info" style="display:none;">Selecting Orange, and Basketball is good with macOS.</div>
</div>
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
<script src="dist/ChoozeDisplay.js"></script>
<script>
$(document).ready(function() {
const options = {
triggerControls: [
{
conditions: [
{ type: 'checkbox', id: 'football', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'apple' },
{ type: 'radio', name: 'os', value: 'windows', state: 'checked' }
],
action: 'show',
target: '#apple-football-windows-info'
},
{
conditions: [
{ type: 'checkbox', id: 'football', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'apple' },
{ type: 'radio', name: 'os', value: 'macos', state: 'checked' }
],
action: 'show',
target: '#apple-football-macos-info'
},
{
conditions: [
{ type: 'checkbox', id: 'basketball', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'apple' },
{ type: 'radio', name: 'os', value: 'windows', state: 'checked' }
],
action: 'show',
target: '#apple-basketball-windows-info'
},
{
conditions: [
{ type: 'checkbox', id: 'basketball', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'apple' },
{ type: 'radio', name: 'os', value: 'macos', state: 'checked' }
],
action: 'show',
target: '#apple-basketball-macos-info'
},
{
conditions: [
{ type: 'checkbox', id: 'football', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'banana' },
{ type: 'radio', name: 'os', value: 'windows', state: 'checked' }
],
action: 'show',
target: '#banana-football-windows-info'
},
{
conditions: [
{ type: 'checkbox', id: 'football', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'banana' },
{ type: 'radio', name: 'os', value: 'macos', state: 'checked' }
],
action: 'show',
target: '#banana-football-macos-info'
},
{
conditions: [
{ type: 'checkbox', id: 'basketball', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'banana' },
{ type: 'radio', name: 'os', value: 'windows', state: 'checked' }
],
action: 'show',
target: '#banana-basketball-windows-info'
},
{
conditions: [
{ type: 'checkbox', id: 'basketball', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'banana' },
{ type: 'radio', name: 'os', value: 'macos', state: 'checked' }
],
action: 'show',
target: '#banana-basketball-macos-info'
},
{
conditions: [
{ type: 'checkbox', id: 'football', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'orange' },
{ type: 'radio', name: 'os', value: 'windows', state: 'checked' }
],
action: 'show',
target: '#orange-football-windows-info'
},
{
conditions: [
{ type: 'checkbox', id: 'football', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'orange' },
{ type: 'radio', name: 'os', value: 'macos', state: 'checked' }
],
action: 'show',
target: '#orange-football-macos-info'
},
{
conditions: [
{ type: 'checkbox', id: 'basketball', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'orange' },
{ type: 'radio', name: 'os', value: 'windows', state: 'checked' }
],
action: 'show',
target: '#orange-basketball-windows-info'
},
{
conditions: [
{ type: 'checkbox', id: 'basketball', state: 'checked' },
{ type: 'select', id: 'fruits', value: 'orange' },
{ type: 'radio', name: 'os', value: 'macos', state: 'checked' }
],
action: 'show',
target: '#orange-basketball-macos-info'
}
]
};
// Initialize the plugin with an option object
$(document).ChoozeDisplay(options);
});
</script>
</body>
</html>