Plugin Directory

Changeset 2037761


Ignore:
Timestamp:
02/23/2019 12:02:32 PM (7 years ago)
Author:
fiverrpelfed
Message:

change js function to use unique names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • visualweb-lazy-load/trunk/public/js/visualweb-lazy-load-public.js

    r2037733 r2037761  
    55        define([], factory(root));
    66    } else {
    7         root.LazyLoad = factory(root);
     7        root.visualwebLazyLoad6471 = factory(root);
    88    }
    99}) (typeof global !== "undefined" ? global : this.window || this.global, function (root) {
     
    1414        src: "data-src",
    1515        srcset: "data-srcset",
    16         selector: ".vweblazyload"
     16        selector: ".vweblazyload6471"
    1717    };
    1818
     
    5353    };
    5454
    55     function LazyLoad(images, options) {
     55    function visualwebLazyLoad6471(images, options) {
    5656        this.settings = extend(defaults, options || {});
    5757        this.images = images || document.querySelectorAll(this.settings.selector);
     
    6060    }
    6161
    62     LazyLoad.prototype = {
     62    visualwebLazyLoad6471.prototype = {
    6363        init: function() {
    6464
     
    134134    };
    135135
    136     root.lazyload = function(images, options) {
    137         return new LazyLoad(images, options);
     136    root.visualweblazyload6471 = function(images, options) {
     137        return new visualwebLazyLoad6471(images, options);
    138138    };
    139139
    140140    if (root.jQuery) {
    141141        const $ = root.jQuery;
    142         $.fn.lazyload = function (options) {
     142        $.fn.visualweblazyload6471 = function (options) {
    143143            options = options || {};
    144144            options.attribute = options.attribute || "data-src";
    145             new LazyLoad($.makeArray(this), options);
     145            new visualwebLazyLoad6471($.makeArray(this), options);
    146146            return this;
    147147        };
    148148    }
    149149
    150     return LazyLoad;
     150    return visualwebLazyLoad6471;
    151151});
    152152jQuery( document ).ready(function() {
    153     jQuery(".vweblazyload").lazyload();
     153    jQuery(".vweblazyload6471").visualweblazyload6471();
    154154});
Note: See TracChangeset for help on using the changeset viewer.