-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathindex.html
More file actions
75 lines (72 loc) · 2.28 KB
/
index.html
File metadata and controls
75 lines (72 loc) · 2.28 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
<!DOCTYPE html>
<html>
<head>
<title>Toggle</title>
<meta charset="utf-8">
<link rel="stylesheet" href="/style/common.css" />
<script src="/bundle.min.js"></script>
</head>
<body>
<style>
.green {
background-color: #23bf42;
}
.blue {
background-color: #94bfdd;
}
.red {
background-color: #cf6400;
}
.blue,
.red,
.green {
display: inline-block;
padding: 5px 15px;
color: white;
}
</style>
<div class="row">
<article class="pat-rich six columns">
<h2>Toggle a class</h2>
<p>
<span class="red" id="toToggle"
>This is getting toggled</span
>
</p>
<p>
<button
class="pat-button pat-toggle"
data-pat-toggle="selector: #toToggle; value: red blue; store: session"
>
Change colour
</button>
</p>
<p>Also notice how the status persists across page reloads.</p>
</article>
<!-- XXX Disable because currently it's not possible to toggle other attributes, only classes
<article class="pat-rich six columns">
<h2>Toggling of attributes</h2>
<fieldset class="pat-checklist">
<label for="">
<input type="checkbox" id="toCheck" /> I will be ticked by the button below
</label>
</fieldset>
<br/>
<p><button class="pat-button pat-toggle" data-pat-toggle="#toCheck checked checked">Toggle checkbox</button></p>
</article>
-->
</div>
<section>
<h2>Toggle with checkboxes and pat-checklist</h2>
<div class="red" id="toggle-2">
This is getting toggled
</div>
<label
class="pat-checklist pat-toggle"
data-pat-toggle="selector: #toggle-2; value: red green; store: local">
<input type="checkbox" name="toggler">
change
</label>
</section>
</body>
</html>