Normal lazy load plug in:
$(function() {
$("img").lazyload({
placeholder : "img/grey.gif",
effect : "fadeIn"
});
});
Can I control the speed of the fadeIn
aspect say 0.9 or 1 second?
Is that possible?
Used with care, lazy-loading images and video can seriously lower the initial load time and page payloads on your site. Users won't incur unnecessary network activity and processing costs of media resources they may never see, but they can still view those resources if they want.
Lazy loading is a technique for waiting to load certain parts of a webpage — especially images — until they are needed. Instead of loading everything all at once, known as "eager" loading, the browser does not request certain resources until the user interacts in such a way that the resources are needed.
Lazy Loading Images is a set of techniques in web and application development that defer the loading of images on a page to a later point in time - when those images are actually needed, instead of loading them up front.
With lazy loading, a web page loads only required content at first, and waits to load any remaining page content until the user needs it. Lazy loading reduces the time it takes for a web page to open because the browser only loads a fraction of the content on the page at a time.
There's an effectspeed
setting as well, for example:
$(function() {
$("img").lazyload({
placeholder : "img/grey.gif",
effect : "fadeIn",
effectspeed: 900
});
});
I don't have an API reference, as the site seems to be unstable at the moment, but you can see it used in the source here: http://www.appelsiini.net/projects/lazyload/jquery.lazyload.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With