Jquery.lazyload.js Picture Lazy Loading

Source: Internet
Author: User

As a Web page, especially when the entire page display pictures more time, the use of the picture delay effect is very good

The method of use is also very simple.

1, in the page any location (usually in front of </body>) plus the following code (note <script> reference two JS files, path self-setting):

<script src= "Js/jquery.min.js" ></script>

<script src= "Js/jquery.lazyload.min" ></script>

<script type= "Text/javascript" charset= "Utf-8" > $ (Function () {$ ("Img.lazy"). Lazyload (); }); </script>

2, the image of the HTML code tags need to write this:

Description

plus class= "lazy" is to better control which pictures delay loading

      is a preloaded picture, generally choosing a small dynamic load sheet

      is the image address that really needs to be displayed.

      is the caption of the picture, which is displayed when the picture is not loaded. This is dispensable.

     &NBSP; Lazy Load Plug-ins additional features:

participating official website: http://www.appelsiini.net/projects/lazyload

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.