If a large number of images are to be displayed on a website, if all the images are loaded at a time, this will inevitably affect the loading speed of the website and bring a poor user experience. You can use the lazy loader plug-in of jquery to implement delayed image loading. When the webpage is relatively long, only images in the user window will be loaded first, the image outside the window will not be loaded until you drag the scroll bar to the back, which effectively avoids the disadvantages of Loading slowly due to too many images.
It is easy to use the lazy loader plug-in. You only need to introduce the lazy loader plug-in on the page, and then call the delayed Loading Method for the images on the page. Lazy loader plug-in: http://www.appelsiini.net/projects/lazyload. Next, let's take a look at the specific usage:
The Code is as follows: