AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/media/lib_compojoom/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/media/lib_compojoom/js/jquery.onimpression.js
/**
 * onImpression : A  jQuery plugin to trigger a callback function when an element is displayed on screen
 * Created by Jason Ramsey - check out http://www.jaseowns.com/solutions/onimpression for examples and use options
 *
 * Licensed under the MIT license.
 *
 * Inspired by Luís Almeida's Unveil https://github.com/luis-almeida
 **/
; (function ($) {
	$.fn.onImpression = function (options) {

		var settings = $.extend({
			offset: 0,
			callback: null,
			attribute: "",
			alwayscallback: false,
			scrollable: ""
		}, options);

		var $window = $(window),
			$scrollable = $(settings.scrollable),
			onImpressionElements = this,
			loaded;

		this.one("onImpression", function () {
			if (typeof settings.callback === "function") settings.callback.call(this, this.getAttribute(settings.attribute));
		});

		this.on("alwaysOnImpression", function () {
			if (typeof settings.callback === "function") settings.callback.call(this, this.getAttribute(settings.attribute));
		});

		function onImpression() {
			var inview = onImpressionElements.filter(function () {
				var $e = $(this);
				if ($e.is(":hidden")) return;
				var wt = $window.scrollTop(),
					wb = wt + $window.height(),
					et = $e.offset().top,
					eb = et + $e.height();
				var inScrollable = false;
				if ($scrollable.length) {
					var scrollTop = $scrollable.scrollTop(),
						scrollBottom = scrollTop + $scrollable.height();
					inScrollable = (eb >= scrollTop - settings.offset && et <= scrollBottom + settings.offset);
				}
				return (eb >= wt - settings.offset && et <= wb + settings.offset) || inScrollable;
			});

			if (settings.alwayscallback) {
				loaded = inview.trigger("alwaysOnImpression");
			}
			else {
				loaded = inview.trigger("onImpression");
				onImpressionElements = onImpressionElements.not(loaded);
			}
		}

		// Only run  code if the callback is available, else there is no point
		if (typeof settings.callback === "function") {
			if ($scrollable.length) {
				$scrollable.on("scroll.onImpression resize.onImpression lookup.onImpression", onImpression);
			} else {
				$window.on("scroll.onImpression resize.onImpression lookup.onImpression", onImpression);
			}
			onImpression();
		}

		return this;
	};

})(window.jQuery);

Anon7 - 2022
AnonSec Team