forked from Patternslib/Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (39 loc) · 2.18 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Switch demo page</title>
<link rel="stylesheet" href="../../style/common.css" type="text/css">
<link rel="stylesheet" href="switch.css" type="text/css">
<script data-main="../../src/autoinit" src="../../bungledeps/require.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<section class="description">
<a href="documentation.md" class="pat-inject" data-pat-inject="source: ## Description::element; target: self::element; trigger: autoload">Description</a>
</section>
<section class="demo">
<h2>Demo</h2>
<h3>Selectively remove class and remember state</h3>
<button class="pat-switch" data-pat-switch="selector: ul.test1 li; remove: mode-Blue ; add: mode-Green; store: session" title="Make all green">Green</button>
<button class="pat-switch" data-pat-switch="selector: ul.test1 li; remove: mode-Green ; add: mode-Blue; store: session" title="Make all blue">Blue</button>
<ul class="test1">
<li class="foo mode-Blue bar">Entry 1</li>
<li class="mode-Green">Entry 2</li>
<li class="mode-Red">Stays red</li>
</ul>
<h3>Remove using prefix</h3>
<button class="pat-switch" data-pat-switch="selector: ul.test2 li; remove: mode-* ; add: mode-Red" title="Make all red">Red</button>
<button class="pat-switch" data-pat-switch="selector: ul.test2 li; remove: mode-* ; add: mode-Green" title="Make all green">Green</button>
<button class="pat-switch" data-pat-switch="selector: ul.test2 li; remove: mode-* ; add: mode-Blue" title="Make all blue">Blue</button>
<ul class="test2">
<li class="foo mode-Blue bar">Entry 1</li>
<li class="mode-Green">Entry 2</li>
<li>Entry 3</li>
</ul>
</section>
<section class="documentation">
<a href="documentation.md" class="pat-inject" data-pat-inject="source: ## Documentation::element; target: self::element; trigger: autoload">Documentation</a>
</section>
<a href="../../index.html" class="pat-inject" data-pat-inject="source: #global-navigation::element; target: self::element; trigger: autoload">Global navigation</a>
</body>
</html>