PageSourceSearch

https://magdaabdogomezlaw.com/wp-content/themes/trust/assets/js/sidebar-scroll-fixed.js?ver=1.0.0

js magdaabdogomezlaw.com collected 2026-10-06 15:13:04 UTC 6,197 bytes, 89 lines download raw bytes

1/**
2 * theia-sticky-sidebar
3 */
4! function(i) {
5    i.fn.theiaStickySidebar = function(t) {
6        var o = {
7            containerSelector: "",
8            additionalMarginTop: 0,
9            additionalMarginBottom: 0,
10            updateSidebarHeight: !0,
11            minWidth: 0,
12            sidebarBehavior: "modern"
13        };
14        t = i.extend(o, t), t.additionalMarginTop = parseInt(t.additionalMarginTop) || 0, t.additionalMarginBottom = parseInt(t.additionalMarginBottom) || 0, i("head").append(i('<style>.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')), this.each(function() {
15            function o() {
16                e.fixedScrollTop = 0, e.sidebar.css({
17                    "min-height": "1px"
18                }), e.stickySidebar.css({
19                    position: "static",
20                    width: ""
21                })
22            }
23
24            function a(t) {
25                var o = t.height();
26                return t.children().each(function() {
27                    o = Math.max(o, i(this).height())
28                }), o
29            }
30            var e = {};
31            e.sidebar = i(this), e.options = t || {}, e.container = i(e.options.containerSelector), 0 == e.container.size() && (e.container = e.sidebar.parent()), e.sidebar.parents().css("-webkit-transform", "none"), e.sidebar.css({
32                position: "relative",
33                overflow: "visible",
34                "-webkit-box-sizing": "border-box",
35                "-moz-box-sizing": "border-box",
36                "box-sizing": "border-box"
37            }), e.stickySidebar = e.sidebar.find(".theiaStickySidebar"), 0 == e.stickySidebar.length && (e.sidebar.find("script").remove(), e.stickySidebar = i("<div>").addClass("theiaStickySidebar").append(e.sidebar.children()), e.sidebar.append(e.stickySidebar)), e.marginTop = parseInt(e.sidebar.css("margin-top")), e.marginBottom = parseInt(e.sidebar.css("margin-bottom")), e.paddingTop = parseInt(e.sidebar.css("padding-top")), e.paddingBottom = parseInt(e.sidebar.css("padding-bottom"));
38            var d = e.stickySidebar.offset().top,
39                r = e.stickySidebar.outerHeight();
40            e.stickySidebar.css("padding-top", 1), e.stickySidebar.css("padding-bottom", 1), d -= e.stickySidebar.offset().top, r = e.stickySidebar.outerHeight() - r - d, 0 == d ? (e.stickySidebar.css("padding-top", 0), e.stickySidebarPaddingTop = 0) : e.stickySidebarPaddingTop = 1, 0 == r ? (e.stickySidebar.css("padding-bottom", 0), e.stickySidebarPaddingBottom = 0) : e.stickySidebarPaddingBottom = 1, e.previousScrollTop = null, e.fixedScrollTop = 0, o(), e.onScroll = function(e) {
41                if (e.stickySidebar.is(":visible")) {
42                    if (i("body").width() < e.options.minWidth) return void o();
43                    if (e.sidebar.outerWidth(!0) + 50 > e.container.width()) return void o();
44                    var d = i(document).scrollTop(),
45                        r = "static";
46                    if (d >= e.container.offset().top + (e.paddingTop + e.marginTop - e.options.additionalMarginTop)) {
47                        var s, n = e.paddingTop + e.marginTop + t.additionalMarginTop,
48                            c = e.paddingBottom + e.marginBottom + t.additionalMarginBottom,
49                            p = e.container.offset().top,
50                            b = e.container.offset().top + a(e.container),
51                            g = 0 + t.additionalMarginTop,
52                            l = e.stickySidebar.outerHeight() + n + c < i(window).height();
53                        s = l ? g + e.stickySidebar.outerHeight() : i(window).height() - e.marginBottom - e.paddingBottom - t.additionalMarginBottom;
54                        var h = p - d + e.paddingTop + e.marginTop,
55                            S = b - d - e.paddingBottom - e.marginBottom,
56                            f = e.stickySidebar.offset().top - d,
57                            m = e.previousScrollTop - d;
58                        "fixed" == e.stickySidebar.css("position") && "modern" == e.options.sidebarBehavior && (f += m), "legacy" == e.options.sidebarBehavior && (f = s - e.stickySidebar.outerHeight(), f = Math.max(f, s - e.stickySidebar.outerHeight())), f = m > 0 ? Math.min(f, g) : Math.max(f, s - e.stickySidebar.outerHeight()), f = Math.max(f, h), f = Math.min(f, S - e.stickySidebar.outerHeight());
59                        var y = e.container.height() == e.stickySidebar.outerHeight();
60                        r = (y || f != g) && (y || f != s - e.stickySidebar.outerHeight()) ? d + f - e.sidebar.offset().top - e.paddingTop <= t.additionalMarginTop ? "static" : "absolute" : "fixed"
61                    }
62                    if ("fixed" == r) e.stickySidebar.css({
63                        position: "fixed",
64                        width: e.sidebar.width(),
65                        top: f,
66                        left: e.sidebar.offset().left + parseInt(e.sidebar.css("padding-left"))
67                    });
68                    else if ("absolute" == r) {
69                        var k = {};
70                        "absolute" != e.stickySidebar.css("position") && (k.position = "absolute", k.top = d + f - e.sidebar.offset().top - e.stickySidebarPaddingTop 
70- e.stickySidebarPaddingBottom), k.width = e.sidebar.width(), k.left = "", e.stickySidebar.css(k)
71                    } else "static" == r && o();
72                    "static" != r && 1 == e.options.updateSidebarHeight && e.sidebar.css({
73                        "min-height": e.stickySidebar.outerHeight() + e.stickySidebar.offset().top - e.sidebar.offset().top + e.paddingBottom
74                    }), e.previousScrollTop = d
75                }
76            }, e.onScroll(e), i(document).scroll(function(i) {
77                return function() {
78                    i.onScroll(i)
79                }
80            }(e)), i(window).resize(function(i) {
81                return function() {
82                    i.stickySidebar.css({
83                        position: "static"
84                    }), i.onScroll(i)
85                }
86            }(e))
87        })
88    }
89}(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.