PageSourceSearch

https://gob-bahia.com.br/wp-content/themes/one-page-express/assets/js/sticky.js?ver=1.3.33

js gob-bahia.com.br collected 2026-10-10 01:39:23 UTC 3,303 bytes, 104 lines download raw bytes

1(function () {
2    jQuery(document).ready(function ($) {
3        var dataprefix = "data-sticky";
4
5        function attrName(name) {
6            return name ? dataprefix + "-" + name : dataprefix;
7        }
8
9        var stickyElements = $('[' + dataprefix + ']');
10        stickyElements.each(function (index, el) {
11            var $el = $(el);
12
13            if ($el.data('stickData')) {
14                return;
15            }
16
17            var distance = parseInt($el.attr(attrName()));
18            var stickyOnMobile = $el.attr(attrName("mobile")) == "1";
19            var stickyOnTablet = true; //$el.attr(attrName("tablet")) == "1" ;
20            var useShrink = $el.attr(attrName("shrinked")) == "1";
21            var toBottom = $el.attr(attrName("to")) == "bottom";
22
23            if (useShrink) {
24                $el.attr(attrName(), "initial");
25            }
26
27            var stickData = {
28                center: true,
29                responsiveWidth: true,
30                zIndex: (10000 + index),
31                topSpacing: distance,
32                stickyOnMobile: stickyOnMobile,
33                stickyOnTablet: stickyOnTablet,
34                useShrink: useShrink,
35                toBottom: toBottom,
36                useNativeSticky: false
37            }
38
39            if (useShrink) {
40                return;
41            }
42
43
44            if (distance === 0 && jQuery('#wpadminbar').length && jQuery('#wpadminbar').css('position') === "absolute") {
45                distance = 0;
46            }
47
48            stickData['topSpacing'] = distance;
49            stickData['top'] = distance;
50
51            $el.data('stickData', stickData);
52            $el.fixTo('body', stickData);
53        });
54
55        var resizeCallback = function () {
56            var stickyElements = this.$els;
57
58            if (window.innerWidth < 1024) {
59                stickyElements.each(function (index, el) {
60                    var data = $(this).data();
61                    var stickData = data.stickData;
62
63                    if (!stickData) {
64                        return;
65                    }
66
67                    var fixToInstance = data.fixtoInstance;
68                    if (!fixToInstance)
69                        return true;
70
71                    if (window.innerWidth <= 767) {
72                        if (!stickData.stickyOnMobile) {
73                            fixToInstance.stop();
74                        }
75                    } else {
76                        if (!stickData.stickyOnTablet) {
77                            fixToInstance.stop();
78                        }
79                    }
80                });
81            } else {
82                stickyElements.each(function (index, el) {
83                    var data = $(this).data();
84                    if (!data) {
85                        return;
86                    }
87                    var fixToInstance = data.fixtoInstance;
88                    if (!fixToInstance)
89                        return true;
90                    fixToInstance.start();
91                })
92            }
93        }
94            .bind({
95                "$els": stickyElements
96            })
97
98        $(window).bind('resize.sticky orientationchange.sticky', function () {
99            setTimeout(resizeCallback, 50);
100        });
101        $(window).trigger('resize.sticky');
102    });
103
104})()

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.