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
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it