-
Notifications
You must be signed in to change notification settings - Fork 237
/
index.html
92 lines (81 loc) · 2.34 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
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Transformicons: Animated Navigation Icons with CSS3</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/style.css">
<script src="js/libs/modernizr-2.5.3.min.js"></script>
</head>
<body>
<header>
<a href="http://sarasoueidan.com/blog/navicon-transformicons">Read Tutorial</a>
</header>
<section role="main">
<h1>Navicon Transformicons</h1>
<h2>Animated Navigation Icons with CSS3 Transforms</h2>
<p>Click on the icons to see them transforming.</p>
<div class="buttons-container">
<button class="lines-button arrow arrow-left">
<span class="lines"></span>
</button>
<button class="lines-button arrow arrow-up">
<span class="lines"></span>
</button>
<button class="lines-button minus">
<span class="lines"></span>
</button>
<button class="lines-button x">
<span class="lines"></span>
</button>
<button class="lines-button x2">
<span class="lines"></span>
</button>
<button class="grid-button rearrange">
<span class="grid"></span>
</button>
<button class="grid-button collapse">
<span class="grid"></span>
</button>
</div>
</section>
<footer>
</footer>
<script>
var anchor = document.querySelectorAll('.lines-button');
[].forEach.call(anchor, function(anchor){
var open = false;
anchor.onclick = function(event){
event.preventDefault();
if(!open){
this.classList.add('open');
open = true;
}
else{
this.classList.remove('open');
open = false;
}
}
});
</script>
<script>
var anchor = document.querySelectorAll('.grid-button');
[].forEach.call(anchor, function(anchor){
var close = false;
anchor.onclick = function(event){
event.preventDefault();
if(!close){
this.classList.add('close');
close = true;
}
else{
this.classList.remove('close');
close = false;
}
}
});
</script>
</body>
</html>