Browse Source

off scroll

master
farhan 3 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,6 +77,10 @@ $(function() {
77 77
             $('.parent').addClass(['z-30']);
78 78
         }
79 79
     });
80
+
81
+    if (distance === 0) {
82
+        $(window).off('scroll'); // Remove scroll event listener
83
+    }
80 84
     // Initially check visibility on page load
81 85
     $(window).trigger('scroll');
82 86
 });

Loading…
Cancel
Save