Jump to content

7.1 - Open menu on Hover vs. Click

Recommended Posts

Posted (edited)

Site URL: https://therosemountinn.squarespace.com/

I've adjusted the site's desktop menu so that it functions as if it were mobile (ie nav bar is hidden, then the menu expands and .header-menu overly is displayed when "Menu" is clicked).

However, I'd like to change the button onclick trigger to onmouseover, so that it opens when someone hovers over Menu, but I'm not well-versed enough in JS to be able to do so on my own.

 

Would appreciate any help - thank you!

Edited by MayaViolet
Hiding access to live site
Posted
On 12/7/2021 at 3:31 AM, MayaViolet said:

Site URL: https://therosemountinn.squarespace.com/

I've adjusted the site's desktop menu so that it functions as if it were mobile (ie nav bar is hidden, then the menu expands and .header-menu overly is displayed when "Menu" is clicked).

However, I'd like to change the button onclick trigger to onmouseover, so that it opens when someone hovers over Menu, but I'm not well-versed enough in JS to be able to do so on my own.

Website w/ password here.

 

Would appreciate any help - thank you!

So you need the side menu to be expanded on hover?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

  • 1 year later...
Posted

Hey! What was the code from @tuanphan for this? TIA!

Sam Crawford | by Crawford.
 
Multi-award-winning Squarespace expert
 
💸 How to scale your income as a Squarespace designer: Watch the video
📱 Hire me to build your Squarespace website: Book a call
 
Did my comment help? To help others benefit, leave a like and mark my answer as 'best'. This lets users scroll straight to the solution they need.
Posted
9 hours ago, bycrawford said:

Hey! What was the code from @tuanphan for this? TIA!

I believe it was the following? I actually have it not active on the client site because we developed a diff solution, and the code link I found in my email shows up with an error, so not sure what if this will work!

 

<!---Menu Hover-->
<script>
$('.header-burger').hover(function(){
    $('body').toggleClass("header--menu-open");
});
</script>
<!---END Menu Hover--->

 

Posted
7 hours ago, MayaViolet said:

I believe it was the following? I actually have it not active on the client site because we developed a diff solution, and the code link I found in my email shows up with an error, so not sure what if this will work!

 

<!---Menu Hover-->
<script>
$('.header-burger').hover(function(){
    $('body').toggleClass("header--menu-open");
});
</script>
<!---END Menu Hover--->

 

Thank you Alyssa!

It doesn't work for me either. @tuanphan - would you be able to take a look at this site for me please: https://www.lanmark.net/

And let me know whether we could do the hover effect for this burger menu?

Thank you 🙂

Sam Crawford | by Crawford.
 
Multi-award-winning Squarespace expert
 
💸 How to scale your income as a Squarespace designer: Watch the video
📱 Hire me to build your Squarespace website: Book a call
 
Did my comment help? To help others benefit, leave a like and mark my answer as 'best'. This lets users scroll straight to the solution they need.

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.