semigrownkid
Member-
Posts
9 -
Joined
-
Last visited
semigrownkid's Achievements
Level 1 (1/20)
0
Reputation
-
Here's my website: https://uxplaybook.org/ How do I fixed the Parity Deals banner below my navigation? Right now its on Top and hides as I scroll. Need some help fixing this under my navigation. Here's the code I used: <!-- Start of Parity Deals Banner --> <script> function debounceCustom(func, timeout =300) { let timer=null; return (...args) => {clearTimeout(timer); timer = setTimeout(() => { func.apply(this, args); }, timeout); }; } function fixHeader() { window.scrollY; const findBanner = document.getElementsByClassName('parity-banner-has-logo'); const findMenu = document.getElementsByClassName('header-announcement-bar-wrapper'); if (findBanner.length > 0 && findMenu.length > 0) { const banner = findBanner[0]; const menu = findMenu[0]; banner.style.zIndex = 100; if (window.scrollY === 0) { menu.style.marginTop = banner.offsetHeight.toString() + 'px'; } else { menu.style.marginTop = '0px'; } } } document.addEventListener('scroll', debounceCustom(fixHeader), { passive: true }); fixHeader(); </script> <!-- End of Parity Deals Banner -->
-
Fixed Parity Deals Banner When Scrolling
semigrownkid replied to semigrownkid's topic in Customize with code
uxplaybook.org -
How do I make this Parity Deals banner appear and scroll with my fixed navigation? Right now my navigation seems to be covering the parity deals banner. <!-- Start of Parity Deals Banner --> <script> function debounceCustom(func, timeout =300) { let timer=null; return (...args) => {clearTimeout(timer); timer = setTimeout(() => { func.apply(this, args); }, timeout); }; } function fixHeader() { window.scrollY; const findBanner = document.getElementsByClassName('parity-banner-has-logo'); const findMenu = document.getElementsByClassName('header-announcement-bar-wrapper'); if (findBanner.length > 0 && findMenu.length > 0) { const banner = findBanner[0]; const menu = findMenu[0]; banner.style.zIndex = 100; if (window.scrollY === 0) { menu.style.marginTop = banner.offsetHeight.toString() + 'px'; } else { menu.style.marginTop = '0px'; } } } document.addEventListener('scroll', debounceCustom(fixHeader), { passive: true }); fixHeader(); </script> <!-- End of Parity Deals Banner -->
-
Navigation Hides Banner On Top of Page (Parity Deals)
semigrownkid replied to semigrownkid's topic in Customize with code
Any ideas how I can fix this @bangank36 @tuanphan -
Add sticky text block with fluid engine
semigrownkid replied to semigrownkid's topic in Customize with code
Yes please. It needs to be fixed until the footer (but not for anything above it)- 11 replies
-
- text
- fluid engine
-
(and 1 more)
Tagged with:
-
Awesome. How do I make the block stick until the footer? Intended purpose is to be used as a sub navigation
-
Site URL: https://uxplaybook.org/ux-accelerator Hello @tuanphan I need help making this block sticky (fluid engine) #block-yui_3_17_2_1_1664264642296_1491046 How do I make this block stop at the footer?
- 11 replies
-
- text
- fluid engine
-
(and 1 more)
Tagged with:
-
Hello @tuanphan I need help making this block sticky (fluid engine) #block-yui_3_17_2_1_1664264642296_1491046 https://uxplaybook.org/ux-accelerator However, this code does not work