Jump to content

Making the drop down items in navigation not appear on hover - only on click

Recommended Posts

  • Replies 9
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

23 hours ago, JustineB said:

Site URL: https://www.artycrow.com.au/

Hi

I have some folders in my navigation as clickable, so I want to stop the drop down menu appearing when someone hovers on it - I am hoping to make the menu drop down only after you click on the nav item. Any help would be great

 

Hope this makes sense!

Justine

Can you provide the protected password?

Edited by bangank36

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 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

 It would probably work to have a drop down navigation button on the page, but I don't know how to do this.

Or even disabling the hover on the first click so the viewer gets to the landing page I have for that nav item, but then have the hover dropdown thereafter. 

The main problem I an trying to fix is that none of the test viewers clicked on the top navigation (which I want them too) because the drop down menu appears. However I want a drop down menu there after they have landed on the page.

 

Edited by JustineB
Link to comment
On 10/23/2021 at 7:03 AM, JustineB said:

 It would probably work to have a drop down navigation button on the page, but I don't know how to do this.

Or even disabling the hover on the first click so the viewer gets to the landing page I have for that nav item, but then have the hover dropdown thereafter. 

The main problem I an trying to fix is that none of the test viewers clicked on the top navigation (which I want them too) because the drop down menu appears. However I want a drop down menu there after they have landed on the page.

 

Hi. Do you still need help?

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
  • 2 weeks later...
On 11/3/2021 at 9:44 AM, JustineB said:

yes I do please

Add to Settings > Advanced > Code Injection > Footer

<style>
  .header-nav .header-nav-item--folder:hover .header-nav-folder-content {
    opacity: 0 !important;
    pointer-events: auto;
    display: none !important;
}
  a.header-nav-folder-title.active+div {
    opacity: 1 !important;
    display: block !important;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(function() {
  $(".header-nav-folder-title").click(function() {
    $(this).toggleClass("active");
  });
});
</script>

 

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
1 hour ago, tuanphan said:
<style>
  .header-nav .header-nav-item--folder:hover .header-nav-folder-content {
    opacity: 0 !important;
    pointer-events: auto;
    display: none !important;
}
  a.header-nav-folder-title.active+div {
    opacity: 1 !important;
    display: block !important;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(function() {
  $(".header-nav-folder-title").click(function() {
    $(this).toggleClass("active");
  });
});
</script>

Thanks so much .. this is working well to hide the drop down so the viewer is clicking on the top navigation, but it is not letting the drop down items show thereafter once your on the page. Is there a way to have the drop down menu appear once you are on the page?  

Kind Regards

Justine

Link to comment
23 hours ago, JustineB said:

Thanks so much .. this is working well to hide the drop down so the viewer is clicking on the top navigation, but it is not letting the drop down items show thereafter once your on the page. Is there a way to have the drop down menu appear once you are on the page?  

Kind Regards

Justine

Add to Code Injection > Header

<style>
  .header-nav-item--active div {
    opacity: 1 !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.