Echo is an independent JavaScript tool for loading images lazily. It is fast, small (less than 1 k), and uses HTML5 data-attributes, this article introduces the JavaScript image delay loading library Echo. js. If you are interested, learn it together. Echo is an independent JavaScript tool for loading images lazily. It is fast, small (less than 1 k), and uses HTML5 data-attributes. Echo supports IE8 +.
Plug-in description: like Lazy Load, Echo. js is also used for image delayed loading of JavaScript. The difference is that Lazy Load is a jQuery-based plug-in, while Echo. js is independent of jQuery or other JavaScript libraries and can be used independently. In addition, Echo. js is very small and less than 1 kb after compression.
Compatibility
Echo. js uses the date attribute of HTML5 and needs to obtain the value of this attribute. Therefore, it is not compatible with IE6 and IE7. Although Lazy Load also uses the date attribute of HTML5, the methods for obtaining values are different.
Usage
1. Import files
The Code is as follows: