From 86d0bdc7d28da4272405e704d8b6782249a0d94b Mon Sep 17 00:00:00 2001 From: tempcode Date: Wed, 9 Aug 2023 17:39:37 +0200 Subject: [PATCH] fix: call NavScroll on page ready --- src/js/plugins/navscroll.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/js/plugins/navscroll.js b/src/js/plugins/navscroll.js index 795b07741f..e5532320f0 100644 --- a/src/js/plugins/navscroll.js +++ b/src/js/plugins/navscroll.js @@ -244,11 +244,10 @@ class NavScroll extends BaseComponent { * ------------------------------------------------------------------------ */ -onDocumentScroll(() => { - const navs = SelectorEngine.find(SELECTOR_NAVSCROLL) - navs.map((nav) => { - NavScroll.getOrCreateInstance(nav) - }) +const navs = SelectorEngine.find(SELECTOR_NAVSCROLL) +navs.map((nav) => { + NavScroll.getOrCreateInstance(nav) }) + export default NavScroll