Skip to content

Commit fcffd5c

Browse files
committed
animated grid cells
1 parent ffe3ec9 commit fcffd5c

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

css/grid.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
justify-content: space-around;
1515
flex: 1;
1616
}
17-
.flex-row > p {
17+
.cell {
1818
display: flex;
1919
flex-flow: column;
2020
justify-content: space-around;
@@ -25,6 +25,9 @@
2525
align-self: stretch;
2626
font-size: 1.25em;
2727
}
28-
.flex-row > p:hover {
28+
.cell:hover {
2929
background: #343840;
3030
}
31+
.cell > p:nth-child(2) {
32+
display: none;
33+
}

index.html

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,40 @@ <h1> Meredith Hoo </h1>
3737
<div class="footer">
3838
<a href="https://github.com/merhoo"><img src="./assets/github-white.svg"></a>
3939
<a href="https://www.linkedin.com/in/merhoo/"><img src="assets/linkedin-logo-icon.svg"></a>
40-
<!--footer-->
4140
</div>
4241
</div>
4342

4443
<!-- Grid ––––––––––––––––––––––––––––––––––––––––––––––– -->
4544
<div class="flex-parent" id="menu">
4645
<div class="flex-row">
47-
<p>about</p>
48-
<p>goals</p>
46+
<div class="cell">
47+
<p class="front">about</p>
48+
<p class="back">test</p>
49+
</div>
50+
<div class="cell">
51+
<p class="front">goals</p>
52+
<p class="back">test</p>
53+
</div>
4954
</div>
5055
<div class="flex-row">
51-
<p>interests</p>
52-
<p>experience</p>
56+
<div class="cell">
57+
<p class="front">interests</p>
58+
<p class="back">test</p>
59+
</div>
60+
<div class="cell">
61+
<p class="front">experience</p>
62+
<p class="back">test</p>
63+
</div>
5364
</div>
5465
<div class="flex-row">
55-
<p>projects</p>
56-
<p>contact</p>
66+
<div class="cell">
67+
<p class="front">projects</p>
68+
<p class="back">test</p>
69+
</div>
70+
<div class="cell">
71+
<p class="front">contact</p>
72+
<p class="back">test</p>
73+
</div>
5774
</div>
5875
</div>
5976

js/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ $(document).ready(function() {
55
scrollTop: $(link).offset().top},
66
'slow');
77
});
8-
8+
$(".cell").click(function(){
9+
$(this).children(":visible").fadeOut();
10+
$(this).children(":hidden").delay(500).fadeIn();
11+
});
912
});

0 commit comments

Comments
 (0)