PageSourceSearch

https://nelsonjsalon.com/wp-content/themes/curly/assets/js/modules/plugins/jquery.appear.js?ver=7.0.5

js nelsonjsalon.com collected 2026-09-26 12:00:48 UTC 2,957 bytes, 78 lines download raw bytes

vendor: 2,957 bytes, lines 1-78
1/*
2 * jQuery.appear
3 * https://github.com/bas2k/jquery.appear/
4 * http://code.google.com/p/jquery-appear/
5 * http://bas2k.ru/
6 *
7 * Copyright (c) 2009 Michael Hixson
8 * Copyright (c) 2012-2014 Alexander Brovikov
9 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
10 */
11(function ($) {
12    $.fn.appear = function (fn, options) {
13        var settings = $.extend({data: undefined, one: true, accX: 0, accY: 0}, options);
14        return this.each(function () {
15            var t = $(this);
16            t.appeared = false;
17            if (!fn) {
18                t.trigger('appear', settings.data);
19                return;
20            }
21            var w = $(window);
22            var check = function () {
23                if (!t.is(':visible')) {
24                    t.appeared = false;
25                    return;
26                }
27                var a = w.scrollLeft();
28                var b = w.scrollTop();
29                var o = t.offset();
30                var x = o.left;
31                var y = o.top;
32                var ax = settings.accX;
33                var ay = settings.accY;
34                var th = t.height();
35                var wh = w.height();
36                var tw = t.width();
37                var ww = w.width();
38                if (y + th + ay >= b && y <= b + wh + ay && x + tw + ax >= a && x <= a + ww + ax) {
39                    if (!t.appeared) t.trigger('appear', settings.data);
40                } else {
41                    t.appeared = false;
42                }
43            };
44            var modifiedFn = function () {
45                t.appeared = true;
46                if (settings.one) {
47                    w.unbind('scroll', check);
48                    var i = $.inArray(check, $.fn.appear.checks);
49                    if (i >= 0) $.fn.appear.checks.splice(i, 1);
50                }
51                fn.apply(this, arguments);
52            };
53            if (settings.one) t.one('appear', settings.data, modifiedFn); else t.bind('appear', settings.data, modifiedFn);
54            w.scroll(check);
55            $.fn.appear.checks.push(check);
56            (check)();
57        });
58    };
59    $.extend($.fn.appear, {
60        checks: [], timeout: null, checkAll: function () {
61            var length = $.fn.appear.checks.length;
62            if (length > 0) while (length--) ($.fn.appear.checks[length])();
63        }, run: function () {
64            if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
65            $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
66        }
67    });
68    $.each(['append', 'prepend', 'after', 'before', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'remove', 'css', 'show', 'hide'], function (i, n) {
69        var old = $.fn[n];
70        if (old) {
71            $.fn[n] = function () {
72                var r = old.apply(this, arguments);
73                $.fn.appear.run();
74                return r;
75            }
76        }
77    });
78})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.