JQuery lazy load Picture lazy load

Source: Internet
Author: User

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

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.