In order to post, you must be logged in and have a membership.

Home Forums Oxygen General Questions Creating a mobile menu with modal

Viewing 1 reply thread
  • Author
    Posts
    • #2584
      Jason Vargas
      Participant

      I created a mobile menu with the modal pop up but its for a single-page website. How do I get it to close once the user gets to the section??

      • This topic was modified 1 month, 2 weeks ago by Jason Vargas.
    • #2587
      Soph Simmonds
      Moderator

      Hi Jason,

      Please try adding the following code to the JavaScript tab of a Code Block on your page: https://gist.github.com/KittenCodes/a2c46ba7a720bb546ad7494dc568e151.

      The code should smoothly scroll to the element and then the Modal should close. Please note that this relies on the links in the menu being hash links without the full site URL (for example, #section and not https://site.com#section).

      I hope this helps!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
menu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram