Implementation of delayed image loading using the lazyloader plug-in based on jquery [simple use] _ jquery-js tutorial

Source: Internet
Author: User
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:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.