Jump to content

Trigger mobile menu drop down

Recommended Posts

Hello

I am putting together a wedding website with my fiancé to send out to guests.  Reality is most of them will likely view the site on their phone.

In mobile view there is a button at the very that says "Menu".  Which then triggers a drop down to display links to the various pages.  But the button is not 100% clear.

So what I'd like to do is to add a "learn more" button, which also triggers the drop down.

I've managed to get the menu to trigger on page load by adding the class "menu-open" the MobileMenu div.  But I cannot work out how to get it to do the same when I click the learn more button.

Is this even possible? What do I need to do?  Currently when I click the button it does nothing and just refreshes the page.

Also can I make it so that the learn more button only appears when in mobile view?

 

Thanks

 

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 11/14/2022 at 7:59 AM, rxssmcdxwell said:

Hello

I am putting together a wedding website with my fiancé to send out to guests.  Reality is most of them will likely view the site on their phone.

In mobile view there is a button at the very that says "Menu".  Which then triggers a drop down to display links to the various pages.  But the button is not 100% clear.

So what I'd like to do is to add a "learn more" button, which also triggers the drop down.

I've managed to get the menu to trigger on page load by adding the class "menu-open" the MobileMenu div.  But I cannot work out how to get it to do the same when I click the learn more button.

Is this even possible? What do I need to do?  Currently when I click the button it does nothing and just refreshes the page.

Also can I make it so that the learn more button only appears when in mobile view?

 

Thanks

 

Can you share your site so I can take a look? a mockup/sample could be good start to work around

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, 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.