Dynamic lazy load plugin for jquery Based on jquery Images

Source: Internet
Author: User

Someone previously introduced images lazyload in the blog Park. Today, I accidentally found the jquery lazyload plug-in, which is very convenient.

Lazy load plugin for jquery detailed introduction and use methods see http://www.appelsiini.net/projects/lazyload

For example:

Simple View Mode Copy to clipboard Print
  1. // Use the current window as the visible area and dynamically load all images whose class is thumb
  2. $ (". Thumb"). lazyload ({// select all images
  3. Placeholder: "img/grey.gif", // The image before loading. It can be a loading image.
  4. Effect: "fadein" // Effect of image loading
  5. });
// Take the current window as the visible area and dynamically load all images whose class is thumb $ (". thumb "). lazyload ({// select all images placeholder: "img/grey.gif", // The image before loading, which can be a loading effect: "fadein" // The effect when the image is loaded });

// Use the ID as the iner as the visible area to dynamically load all images

Define a container first
  1. # Container {
  2. Height: 600px;
  3. Width: 600px;
  4. Overflow: Scroll;
  5. }
First define a container # container {Height: 600px; width: 600px; overflow: Scroll ;}
Simple View Mode Copy to clipboard Print
  1. $ ("IMG"). lazyload ({
  2. Placeholder: "img/grey.gif ",
  3. Container: $ ("# container ")
  4. });

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.