Hello,
From an unknown reason my last post didn’t show up so I’ll try again.
Problem:
I have four menu items in fullscreen menu. What am I trying to do is to animate menu closing when inpage link is clicked (menu-item “Proizvodi”). I am having trouble to close menu-overlay and animate burger menu.
Can someone help me please?
So you could try to trick it by adding some custom code that will add an additional on click interaction that will simulate clicking on the menu -
something like this -
$( “#nav-link” ).click(function() {
$( “#menu-parent” ).click();
});
So I need to add embed code to navigation and paste the code you wrote into script tag. Unfortunately I don’t have any coding experience in order to execute this properly (I suppose).
you only embed the code in the “Custom Code” section of the page settings in the “before body” tag
the code needs to be in the script tags jut like you said… and to test functionality you have to publish the page and go to the live page to see if it works…
I tried code that you gave me, still with no success, but you gave me an idea what I should do. I wrote some code (it turns out that I still posses some knowledge in JS) and consulted my friend and we made this solution that works (picture below).
I very much appreciate time that you had put in helping me. Thanks!
First of all, thanks @leksapgd for the great solution! As my personal contribution, here’s the code snippet as text , also for me worked only by making it run after all the content was loaded, so I added the DOM event listener.
For the newbies: remember to replace the class .menu_item and the ID menu-toggle for your own
Hope this helps!