Jump to content

Mega Menu does not display properly

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://ttmspa.com

Hello! I was hoping someone could help me with an issue I am seeing on my website.

I have a mega menu using code injection, but starting today, the menu has a block of white space above the menu content. I have referred to the source pages for the mega menu and everything displays properly. 

Below is the code injection:

<script>
  $('.header-nav-folder-title[href^="/mega-"]').each(function() {
    var link = $(this).attr('href');
    var idName = link.slice(6);
    $(this).parent().addClass('mega-menu');
    $(this).parent().after('<div id='+idName+' class="mega-menu-item"></div>'); 
    $('#'+idName).load('/mega-page-' + idName + ' #page',function(){
      window.Squarespace.initializeLayoutBlocks(Y);
    });
  })
</script>

 

Thank you so much!

Screen Shot 2021-06-29 at 4.14.39 PM.png

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
On 6/30/2021 at 3:18 AM, ZoSkinJon said:

Site URL: https://ttmspa.com

Hello! I was hoping someone could help me with an issue I am seeing on my website.

I have a mega menu using code injection, but starting today, the menu has a block of white space above the menu content. I have referred to the source pages for the mega menu and everything displays properly. 

Below is the code injection:

<script>
  $('.header-nav-folder-title[href^="/mega-"]').each(function() {
    var link = $(this).attr('href');
    var idName = link.slice(6);
    $(this).parent().addClass('mega-menu');
    $(this).parent().after('<div id='+idName+' class="mega-menu-item"></div>'); 
    $('#'+idName).load('/mega-page-' + idName + ' #page',function(){
      window.Squarespace.initializeLayoutBlocks(Y);
    });
  })
</script>

 

Thank you so much!

Screen Shot 2021-06-29 at 4.14.39 PM.png

You announcement style messed with the mega menu

.mega-menu-item .page-section {
  padding-top: 0 !important;
}

image.thumb.png.24f07d174f6d65a4915f32d8528212b8.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.