Software: Apache. PHP/5.6.40 uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24 uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) Safe-mode: OFF (not secure) /home/cp949260/public_html/phbcoop.com/vendor/jquery.pin/ drwxr-xr-x |
Viewing file: Select action/file-type: /* Plugin Name: jQuery.pin https://github.com/webpop/jquery.pin Licensed under the terms of the MIT license. */ (function ($) { "use strict"; $.fn.pin = function (options) { var scrollY = 0, elements = [], disabled = false, $window = $(window); options = options || {}; var recalculateLimits = function () { for (var i=0, len=elements.length; i<len; i++) { var $this = elements[i]; if (options.minWidth && $window.width() <= options.minWidth) { if ($this.parent().is(".pin-wrapper")) { $this.unwrap(); } $this.css({width: "", left: "", top: "", position: ""}); if (options.activeClass) { $this.removeClass(options.activeClass); } disabled = true; continue; } else { disabled = false; } var $container = options.containerSelector ? $this.closest(options.containerSelector) : $(document.body); var offset = $this.offset(); var containerOffset = $container.offset(); var parentOffset = $this.parent().offset(); if (!$this.parent().is(".pin-wrapper")) { $this.wrap("<div class='pin-wrapper'>"); } var pad = $.extend({ top: 0, bottom: 0 }, options.padding || {}); $this.data("pin", { pad: pad, from: (options.containerSelector ? containerOffset.top : offset.top) - pad.top, to: containerOffset.top + $container.height() - $this.outerHeight() - pad.bottom, end: containerOffset.top + $container.height(), parentTop: parentOffset.top }); $this.css({width: $this.outerWidth()}); $this.parent().css("height", $this.outerHeight()); } }; var onScroll = function () { if (disabled) { return; } scrollY = $window.scrollTop(); var elmts = []; for (var i=0, len=elements.length; i<len; i++) { var $this = $(elements[i]), data = $this.data("pin"); if (!data) { // Removed element continue; } elmts.push($this); var from = data.from - data.pad.bottom, to = data.to - data.pad.top; if (from + $this.outerHeight() > data.end) { $this.css('position', ''); continue; } if (from < scrollY && to > scrollY) { !($this.css("position") == "fixed") && $this.css({ left: $this.offset().left, top: data.pad.top }).css("position", "fixed"); if (options.activeClass) { $this.addClass(options.activeClass); } } else if (scrollY >= to) { $this.css({ left: "", top: to - data.parentTop + data.pad.top }).css("position", "absolute"); if (options.activeClass) { $this.addClass(options.activeClass); } } else { $this.css({position: "", top: "", left: ""}); if (options.activeClass) { $this.removeClass(options.activeClass); } } } elements = elmts; }; var update = function () { recalculateLimits(); onScroll(); }; this.each(function () { var $this = $(this), data = $(this).data('pin') || {}; if (data && data.update) { return; } elements.push($this); $("img", this).one("load", recalculateLimits); data.update = update; $(this).data('pin', data); }); $window.scroll(onScroll); $window.resize(function () { recalculateLimits(); }); recalculateLimits(); $window.on('load', update); return this; }; })(jQuery); |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.19 ]-- |