Skip to content

Commit

Permalink
Circles move at different rates
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phultquist authored Jul 20, 2021
1 parent dec1d8d commit b86b1b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion views/pages/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@
<script>
$(window).scroll(() => {
var yoff = window.pageYOffset;
$(".bg-circle").css('transform', 'translateY('+0.6*yoff+'px)')
$(".bg-circle").map((i, a) => {
$(a).css('transform', 'translateY(' + (i + 1) / 6 * yoff + 'px)');
})
});
</script>

Expand Down

0 comments on commit b86b1b2

Please sign in to comment.