Home › Forums › WoodMart support forum › Mobile Menu Lazy Load
Mobile Menu Lazy Load
- This topic has 9 replies, 3 voices, and was last updated 5 years, 5 months ago by Artem Temos.
-
AuthorPosts
-
November 17, 2018 at 1:17 pm #90048
JoeParticipantLazy load is broken on my mobile menu. It doesn’t appear to realize the images are in view when you scroll down the whb-mobile-left menu.
I think fixing it is as easy as adding
$(document).trigger(‘wood-images-loaded’);
to the mobile menu open trigger, but I’m not sure where that is.
Thanks,
JoeNovember 17, 2018 at 3:50 pm #90075
Elise NoromitMemberHello,
Please provide the screen showing the problem as well as you site admin access so that we could check
Best Regards
November 17, 2018 at 3:53 pm #90076
JoeParticipantYou can see it by visiting https://parisbloom.com on your mobile device or using a small browser window on your computer.
I have added blog posts and Instagram pictures below the menu, notice they do not show until you scroll the main page (not the menu)
I just need an option to manually trigger the lazy load when the menu opens, or a way to prevent lazy loading of the mobile menu items.
November 17, 2018 at 4:04 pm #90084
Artem TemosKeymasterWe just checked on mobile devices and images are loaded initially. So when we open the mobile menu we see your instagram and blog images.
November 17, 2018 at 4:09 pm #90086
JoeParticipantI’ve added two screen shots. The first shows what I see when opening the mobile menu.
The second shows that the images load after scrolling down the page.
I suspect the mobile menu HTML is far enough down the page that your lazy load script does not see them as in view until scrolling down.
So if you open the menu without scrolling the page at all, it thinks they’re still not in view.
Attachments:
You must be logged in to view attached files.November 17, 2018 at 4:09 pm #90089
JoeParticipantSecond image isn’t loading because it’s too large for your website. I’ll edit this post with a link in a second.
Edit: second image showing that they load after scrolling down the page.
November 17, 2018 at 4:33 pm #90096
JoeParticipantI forgot to mention, I know it’s lazy load because it works fine when disabled.
Thank you
November 18, 2018 at 9:35 am #90157
Artem TemosKeymasterTry to add the following code snippet to the Custom JS area in Theme Settings to fix this issue.
jQuery('.mobile-nav').scroll(function(e) { jQuery(document).trigger('wood-images-loaded'); });
November 18, 2018 at 2:15 pm #90205
JoeParticipantThis works perfectly, thank you.
November 18, 2018 at 3:10 pm #90214
Artem TemosKeymasterGreat, you are welcome.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register