Home › Forums › WoodMart support forum › JS file of menu
JS file of menu
- This topic has 17 replies, 2 voices, and was last updated 1 year, 3 months ago by Luke Nielsen.
-
AuthorPosts
-
September 20, 2023 at 3:34 pm #497765
webreturnParticipantHi, when we hover the menu with litespeed plugin enable delayed loading then it is not working. See privact details. Which js file do we have to exclude to make this working?
September 21, 2023 at 9:09 am #497910
Luke NielsenKeymasterHello,
Here is that JS file:
js/scripts/menu/menuOffsets.js
Don’t hesitate to let me know if you need any further help or any other info.
Kind Regards
September 21, 2023 at 11:03 am #497942
webreturnParticipantHello Luke,
Thanks for your response!
When we disable the delayed for the JS file, the menu doesn’t open up at all.
Is there any other files that are being used for the dropdown mega menu’s? We’re using HTML blocks and are not using AJAX loading.Kind Regards
September 21, 2023 at 12:58 pm #497993
Luke NielsenKeymasterHello,
Unfortunately, I cannot tell you exactly what happened because we do not support that plugin therefore check your actions with the plugin’s documentation and add the below files to the exception:
jquery.min helpers.min.js clickOnScrollButton searchFullScreen menuOffsets menuDropdowns cartWidget mobileNavigation loginSidebar menuSetUp cart-fragments slick productImages cookie.min owl.carousel owlCarousel imagesLoaded
Kind Regards
September 21, 2023 at 3:13 pm #498048
webreturnParticipantHi Luke,
Unfortunately adding the files does not work. Whenever we hover over an item in the main menu the background will be darker, but the HTML block does not show up. Do you have any idea what might be causing this?
We have created over 50 websites with Woodmart and most of them are using Litespeed caching, it would be nice if you could help us fix this issue.
Kind Regards,
MaxSeptember 25, 2023 at 11:51 am #498976
Luke NielsenKeymasterHello,
At the moment I do not see the issue: https://take.ms/3zmte
Please let me know if you have sorted this out or If I missed something, send me access to the admin dashboard so I will check it on your side.
Kind Regards
September 25, 2023 at 2:25 pm #499071
webreturnParticipantHello,
That’s because we disabled the delayed loading of JS on the main website, since the entire menu wasn’t working.
It is however not working on this staging enviroment: https://janwit.nl/minmax/September 25, 2023 at 4:48 pm #499148
Luke NielsenKeymasterHello,
May I request you send access to the staging site? So I can test the issue there.
Looking forward to collaborating with you!
Kind Regards
September 25, 2023 at 4:56 pm #499153
webreturnParticipantOf course, the login is in the private content.
September 25, 2023 at 5:12 pm #499156
Luke NielsenKeymasterHello,
Seems that access is wrong: https://monosnap.com/file/EDQchzp7fe9E2uChmMEGv46eOePeMB , could you please update it?
Thank you in advance.
Kind Regards
September 25, 2023 at 5:24 pm #499158
webreturnParticipantHi Luke,
My bad, please try again with the information in the private content (same as earlier).
September 26, 2023 at 10:02 am #499267
webreturnParticipantHi Luke,
It seems like the following line in file
helpers.min.js
triggers an event:
jQuery(window).trigger("wdEventStarted")
This event is triggered inside an event listener for
window.onload
.File
menuOffsets.min.js
adds an event listener to that event, but it seems like the event is either called too early or not at all, because when I manually runjQuery(window).trigger("wdEventStarted")
the menu does work.September 26, 2023 at 11:55 am #499307
Luke NielsenKeymasterHello,
Most likely, the trigger doesn’t work because the menu doesn’t work. So please add the
helpers.min.js
file to the exceptions and recheck the issue.Kind Regards
September 26, 2023 at 12:45 pm #499326
webreturnParticipantHi Luke,
The
helpers.min.js
file was already excluded.
What is the chain of scripts/events that should lead to the event listener in filemenuOffsets.min.js
being called?September 27, 2023 at 11:34 am #499569
webreturnParticipantI have found the solution.
The reason why it didn’t work, is because the onload event is set in the following way:window.onload = function() { // code here };
Instead, it should be set this way:
window.addEventListener('load', function() { // code here });
Would you be willing to change this in file
/js/scripts/global/helpers.min.js
, so that we don’t lose our fixes after updating the theme?September 27, 2023 at 11:38 am #499570
Luke NielsenKeymasterHello,
In the 7.4 update, we will add such changes.
If you have any other questions or concerns, please do not hesitate to reach out, I’d love to help!
Kind Regards
September 27, 2023 at 12:43 pm #499591
webreturnParticipantThank you!
September 27, 2023 at 12:46 pm #499593
Luke NielsenKeymasterHello,
You are welcome! In case you need any additional help, I’d be more than happy to assist you.
Have a good day!
Kind Regards
-
AuthorPosts
The topic ‘JS file of menu’ is closed to new replies.
- You must be logged in to create new topics. Login / Register