Sha256: 1ae840916a738125cc1e5901f035d3a2b983527f3b01c28dfbf1b5abcf2b2189
Contents?: true
Size: 1.01 KB
Versions: 7
Compression:
Stored size: 1.01 KB
Contents
(function (global, $) { var Checkr = function (desktop) { return new Checkr.init(desktop); }; Checkr.prototype = { width( site = ".site", overlay = ".area.overlay-mobile", display = "grid" ) { if (!this.desktop) { gsap.set(site, { clearProps: "display" }); gsap.set(overlay, { display: display }); this.print(); } else { gsap.set(overlay, { clearProps: "display" }); gsap.set(site, { display: display }); } }, print(self = ".width", width = 1200, bar = ".bar.mobile") { if (!this.desktop) { var size = document.documentElement.clientWidth, more = width - size + "px", percent = (100 / width) * size + "%"; $(self).html(more); gsap.set(bar, { width: percent }); } }, }; Checkr.init = function (desktop) { var self = this; self.desktop = desktop; this.width(); }; Checkr.init.prototype = Checkr.prototype; global.Checkr = Checkr; })(window, $);
Version data entries
7 entries across 7 versions & 1 rubygems