Skip to content

Commit b86b1b2

Browse files
author
Patrick Hultquist
authored
Circles move at different rates
This is something that I always saw and wanted to add to the site, but always had something else to do with JHMC. Just thought of it, so here we are.
1 parent dec1d8d commit b86b1b2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

views/pages/home.ejs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@
204204
<script>
205205
$(window).scroll(() => {
206206
var yoff = window.pageYOffset;
207-
$(".bg-circle").css('transform', 'translateY('+0.6*yoff+'px)')
207+
$(".bg-circle").map((i, a) => {
208+
$(a).css('transform', 'translateY(' + (i + 1) / 6 * yoff + 'px)');
209+
})
208210
});
209211
</script>
210212

0 commit comments

Comments
 (0)