Changeset 2037761
- Timestamp:
- 02/23/2019 12:02:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
visualweb-lazy-load/trunk/public/js/visualweb-lazy-load-public.js
r2037733 r2037761 5 5 define([], factory(root)); 6 6 } else { 7 root. LazyLoad= factory(root);7 root.visualwebLazyLoad6471 = factory(root); 8 8 } 9 9 }) (typeof global !== "undefined" ? global : this.window || this.global, function (root) { … … 14 14 src: "data-src", 15 15 srcset: "data-srcset", 16 selector: ".vweblazyload "16 selector: ".vweblazyload6471" 17 17 }; 18 18 … … 53 53 }; 54 54 55 function LazyLoad(images, options) {55 function visualwebLazyLoad6471(images, options) { 56 56 this.settings = extend(defaults, options || {}); 57 57 this.images = images || document.querySelectorAll(this.settings.selector); … … 60 60 } 61 61 62 LazyLoad.prototype = {62 visualwebLazyLoad6471.prototype = { 63 63 init: function() { 64 64 … … 134 134 }; 135 135 136 root. lazyload= function(images, options) {137 return new LazyLoad(images, options);136 root.visualweblazyload6471 = function(images, options) { 137 return new visualwebLazyLoad6471(images, options); 138 138 }; 139 139 140 140 if (root.jQuery) { 141 141 const $ = root.jQuery; 142 $.fn. lazyload= function (options) {142 $.fn.visualweblazyload6471 = function (options) { 143 143 options = options || {}; 144 144 options.attribute = options.attribute || "data-src"; 145 new LazyLoad($.makeArray(this), options);145 new visualwebLazyLoad6471($.makeArray(this), options); 146 146 return this; 147 147 }; 148 148 } 149 149 150 return LazyLoad;150 return visualwebLazyLoad6471; 151 151 }); 152 152 jQuery( document ).ready(function() { 153 jQuery(".vweblazyload ").lazyload();153 jQuery(".vweblazyload6471").visualweblazyload6471(); 154 154 });
Note: See TracChangeset
for help on using the changeset viewer.