Jump to content

semigrownkid

Member
  • Posts

    9
  • Joined

  • Last visited

semigrownkid's Achievements

Level 1

Level 1 (1/20)

0

Reputation

  1. 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 -->
  2. 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 -->
  3. Site URL: https://uxplaybook.org/ Unsure why the navigation is hiding my PPP banner. I toggled the navigation fixed (basic & scroll back) and unfixed -- doesn't work. As Parity Deals just offers a JS code, what can I do to make sure its on top of the navigation (or it not be hidden)?
  4. Yes please. It needs to be fixed until the footer (but not for anything above it)
  5. Awesome. How do I make the block stick until the footer? Intended purpose is to be used as a sub navigation
  6. 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?
  7. 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
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.