Commit 439de371 authored by Hussain Khalil's avatar Hussain Khalil

Fix scroll height detection

parent 14a65db2
......@@ -59,7 +59,7 @@ $(document).scroll(() => {
// Loop that determines which backgrounds should be opaque
for(var i = 1; i <= numOfBackgrounds; i++) {
if(($("body").scrollTop() / $(window).height()) + 1.5 >= i) {
if(($(document).scrollTop() / $(window).height()) + 1.5 >= i) {
$("#background-section-"+i).css("opacity", 1);
} else {
$("#background-section-"+i).css("opacity", 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment