| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | module.exports = factory(root); |
| 4 | 4 | } else if (typeof define === "function" && define.amd) { |
| 5 | 5 | define([], factory); |
| 6 | 6 | } else { |
| 7 | - root.LazyLoad = factory(root); | |
| 7 | + root.__tagembed__LazyLoad = factory(root); | |
| 8 | 8 | } |
| 9 | 9 | })(typeof global !== "undefined" ? global : this.window || this.global, function (root) { |
| 10 | 10 | "use strict"; |
| 11 | 11 | if (typeof define === "function" && define.amd) { |
| @@ -45,15 +45,15 @@ | ||
| 45 | 45 | merge(obj); |
| 46 | 46 | } |
| 47 | 47 | return extended; |
| 48 | 48 | }; |
| 49 | - function LazyLoad(images, options) { | |
| 49 | + function __tagembed__LazyLoad(images, options) { | |
| 50 | 50 | this.settings = extend(defaults, options || {}); |
| 51 | 51 | this.images = images || document.querySelectorAll(this.settings.selector); |
| 52 | 52 | this.observer = null; |
| 53 | 53 | this.init(); |
| 54 | 54 | } |
| 55 | - LazyLoad.prototype = { | |
| 55 | + __tagembed__LazyLoad.prototype = { | |
| 56 | 56 | init: function () { |
| 57 | 57 | if (!root.IntersectionObserver) { |
| 58 | 58 | this.loadImages(); |
| 59 | 59 | return; |
| @@ -121,18 +121,18 @@ | ||
| 121 | 121 | this.observer.disconnect(); |
| 122 | 122 | this.settings = null; |
| 123 | 123 | } |
| 124 | 124 | }; |
| 125 | - root.lazyload = function (images, options) { | |
| 126 | - return new LazyLoad(images, options); | |
| 125 | + root.__tagembed__lazyload = function (images, options) { | |
| 126 | + return new __tagembed__LazyLoad(images, options); | |
| 127 | 127 | }; |
| 128 | 128 | if (root.jQuery) { |
| 129 | 129 | const $ = root.jQuery; |
| 130 | - $.fn.lazyload = function (options) { | |
| 130 | + $.fn.__tagembed__lazyload = function (options) { | |
| 131 | 131 | options = options || {}; |
| 132 | 132 | options.attribute = options.attribute || "data-src"; |
| 133 | - new LazyLoad($.makeArray(this), options); | |
| 133 | + new __tagembed__LazyLoad($.makeArray(this), options); | |
| 134 | 134 | return this; |
| 135 | 135 | }; |
| 136 | 136 | } |
| 137 | - return LazyLoad; | |
| 137 | + return __tagembed__LazyLoad; | |
| 138 | 138 | }); |