Jump to content

Nav dropdown opens on click (as stays open) and closes on click instead of hover

Recommended Posts

  • Replies 4
  • Views 246
  • Created
  • Last Reply

Top Posters In This Topic

Try adding to Last Line in Settings > Advanced > Code Injection > Footer

<script>
  $(document).ready(function(){ $("div.header-nav-item--folder").click(function(){
  $('.header-nav-folder-content').toggleClass('show-folder');
});
});
</script>
<style>
  .header-nav .header-nav-item--folder:hover .header-nav-folder-content {
    opacity: 0 !important;
    position: absolute !important;
}
 .header-nav .header-nav-item--folder .header-nav-folder-content.show-folder {
    opacity: 1 !important;
    position: relative !important;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (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.