如何制作图片预加载插件实现高效图片展示?
- 内容介绍
- 文章标签
- 相关推荐
本文共计202个文字,预计阅读时间需要1分钟。
javascriptpreLoad.js(function($) { function preLoad(imgs, options) { this.imgs=(typeof imgs==='string') ? [imgs] : imgs; this.opts=$.extend({}, options); }})(jQuery);
preLoad.js(function ($) { /*构造方法*/ function preLoad(imgs, options) { this.imgs = (typeof imgs === 'string') ? [imgs] : imgs; //$.extend 用一个或多个其他对象来扩展一个对象,返回被扩展的对象。
本文共计202个文字,预计阅读时间需要1分钟。
javascriptpreLoad.js(function($) { function preLoad(imgs, options) { this.imgs=(typeof imgs==='string') ? [imgs] : imgs; this.opts=$.extend({}, options); }})(jQuery);
preLoad.js(function ($) { /*构造方法*/ function preLoad(imgs, options) { this.imgs = (typeof imgs === 'string') ? [imgs] : imgs; //$.extend 用一个或多个其他对象来扩展一个对象,返回被扩展的对象。

