延迟加载延迟 [英] Lazy Load delay
问题描述
我使用的是Mika Tuupola的延迟加载,它非常好,但是需要延迟加载即使图像超过折痕...
I'm using Mika Tuupola's Lazy Load, which is excellent, but need to delay loading even when image above the fold...
因此,用户滚动查看图像时,我想延迟400ms然后显示图像.
So, user scrolls, when image in view I want to delay 400ms then show the image.
有一种方法可以增加阈值,以便在显示之前加载图像,但是没有其他方法.
There is a way to increase threshold so images load before shown, but not other way.
我已经在github上搜索了文档,并且找到了不重新发明轮子的方法.
I've searched docs on github and can't find a way to do this without reinventing wheels.
有人这样做吗?我知道这可能看起来很奇怪,但是有这样做的正当理由.
Has anyone done this? I know it might seem strange but there's a valid reason for wanting to do it.
推荐答案
来自 docs :
我假设您可以绑定scroll
事件而不是load
事件,并且它的工作原理相同.
I assume you can bind the scroll
event instead of load
and it would work just the same.
这篇关于延迟加载延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!