Recently used js plug-ins: TouchSlide. js, LazyLoad. js,
Recently used several useful js plug-ins, one is lazyLoad. js for delayed loading, and the other is TouchSlide. js that provides the scrolling playback effect.
Attached usage Portal:
LazyLoad (loading only images within the field of view): http://www.cnblogs.com/ahjesus/archive/2010/10/09/1998642.html
TouchSlide (mobile version, independent of other js libraries): http://www.superslide2.com/TouchSlide/howToUse.html
How to Use JqueryLazyLoadjs,
Here is a link for Jquery. LazyLoad usage.
Www.neoease.com/..image/
How to Implement lazyload in JS
$. Belowthefold = function (element, settings) {if (settings. container === undefined | settings. container = window) {var fold = $ (window ). height () + $ (window ). scrollTop ()} else {var fold = $ (settings. container ). offset (). top + $ (settings. container ). height ()} return fold <= $ (element ). offset (). top-settings. threshold}; $. rightoffold = function (element, settings) {if (settings. container === undefined | settings. container = window) {var fold = $ (window ). width () + $ (window ). scrollLeft ()} else {var fold = $ (settings. container ). offset (). left + $ (settings. container ). width ()} return fold <= $ (element ). offset (). left-settings. threshold}; this is from lazyload. the two pieces of code extracted in js first judge scrolltop + body. whether the offsetHeight parameter is set. When determining the left margin of the screen and adding the width of the slice, there is a display: none parameter to determine whether it is useful to you.
In this way, images that are not on the screen are not loaded and need to be called again to load the images,