The latest version of Jquery.lazyload.js is no longer pseudo deferred loading
One, please follow the basic use method to explain the setting
Copy Code code as follows:
Loading JavaScript files
<script src= "Jquery.js" type= "Text/javascript" ></script>
<script src= "Jquery.lazyload.js" type= "Text/javascript" ></script>
Copy Code code as follows:
The 4 attributes of an IMG tag can be less than one, otherwise the effects of deferred loading are not implemented as follows:
Copy Code code as follows:
Use
$ (function () {
$ ("Img.lazy"). Lazyload ();
});
Second, the commonly used attribute description
Copy Code code as follows:
THRESHOLD:200//Set sensitivity, means to enter the display area and 200 pixels to start loading
Effect: "FadeIn"//Using Fade effect
FAILURE_LIMIT:10//Tolerance range, be sure to set this value, the reason for the description please refer to the original document
Container: $ ("#container")//using parent container, the CSS style of the parent container should contain at least "Height:600px;overflow:scroll" Two properties
Event: "Click"//Modify trigger event to click
Third, the reference
English reference: Http://www.appelsiini.net/projects/lazyload
Chinese reference: http://code.ciaoca.com/jquery/lazyload/