A jQuery-based picture delay-loading plugin that loads after the user scrolls the page to the picture.
For more pictures of the page, using the picture delay loading, can effectively improve the page loading speed.
-
Version:
-
jQuery v1.4.4+
-
jQuery Lazy Load v1.7.2
-
Precautions:
-
to actually implement the picture delay loading, the real picture address must be written in the Data-original attribute. If SRC is the same as data-original, it is only a special effect and does not reach the function of lazy loading.
-
loading JavaScript files
Modifying an IMG tag that requires lazy loading in HTML code
<!-- Write the real picture address in the data-original property, and the picture in the SRC attribute to a placeholder image (such as a 1x1 pixel gray picture or a loading GIF image), add class= "La Zy
Call the Lazy Load
$ (' Img.lazy '). Lazyload ();
This article is derived from this
JQuery lazy load Picture lazy load