Close Button on One Page Mobile Menu
-
Hi,
We are currently working on the website for the Creative Paper Conference here in Munich using your great laytheme. Have a look at our Sandbox here: http://cpc2020.testtest.net/.
Almost everything works fine so far. We have only a small problem with our mobile menu. Since it is a one-page design we use scroll to Id for our menu. Even though we found a javascript solution in the lay theme forum for making the menu disappear after clicking on the menu point and arriving at the designated #id, we have now some trouble to toggle the close button. For now, the close button remains a 'cross' instead of returning to the hamburger state.
Here is the code we have from the forum:
<script> jQuery(document).on("click", ".mobile-nav ul li a", function(event) { jQuery(".mobile-nav").removeClass('active'); jQuery(".mobile-nav").css('transform', 'translateY(-500px)'); }); </script>If you have a quick tip how we can toggle this event, we would eb more than thankful.
We wish you a great weekend and stay safe!
Joseph
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login