Browse Source

off scroll

master
farhan 4 months ago
parent
commit
880bf8c793
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      resources/js/app.js

+ 4
- 0
resources/js/app.js View File

77
             $('.parent').addClass(['z-30']);
77
             $('.parent').addClass(['z-30']);
78
         }
78
         }
79
     });
79
     });
80
+
81
+    if (distance === 0) {
82
+        $(window).off('scroll'); // Remove scroll event listener
83
+    }
80
     // Initially check visibility on page load
84
     // Initially check visibility on page load
81
     $(window).trigger('scroll');
85
     $(window).trigger('scroll');
82
 });
86
 });

Loading…
Cancel
Save