[英]How to add fadein effect to lazyloader
I have a lazyloader for the images on my site. 我的网站上有一个lazyloader用于加载图片。 Here's the JS: 这是JS:
$("img[data-src]").responsivelazyloader();
$("body").on({ ajaxStop : function(){ $("img[data-src]").responsivelazyloader(); }});
It works, but the images just pop in, is there a way to make them fadein on load so it's all a little smoother? 它可以工作,但是图像会突然弹出,是否有办法使它们在加载时淡入,从而使其更加平滑? Here's one of the URLs where you can http://helloarchie.blue/posts/fashion-friday-be-like-the-cool-kids-026 这是您可以http://helloarchie.blue/posts/fashion-friday-be-like-the-cool-kids-026的网址之一
From Lazy Load Plugin for jQuery, see the fadeIn demo here http://www.appelsiini.net/projects/lazyload/enabled_fadein.html 从适用于jQuery的惰性加载插件中,在此处查看FadeIn演示http://www.appelsiini.net/projects/lazyload/enabled_fadein.html
The implementation 实施
$("img.lazy").lazyload({
effect : "fadeIn"
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.