PageSourceSearch

https://www.zubiripamplona.com/wp-content/themes/maniva-meetup/js/nav.js?ver=7.1.2

js zubiripamplona.com collected 2026-10-02 22:25:23 UTC 4,087 bytes, 119 lines download raw bytes

1(function (d, c, a, e) {
2    "use strict";
3    var b = function (g, f) {
4        this.elem = g;
5        this.$elem = d(g);
6        this.options = f;
7        this.metadata = this.$elem.data("plugin-options");
8        this.$win = d(c);
9        this.sections = {};
10        this.didScroll = false;
11        this.$doc = d(a);
12        this.docHeight = this.$doc.height()
13    };
14    b.prototype = {defaults: {navItems: "a", currentClass: "current", changeHash: false, easing: "swing", filter: "", scrollSpeed: 750, scrollThreshold: 0.5, begin: false, end: false, scrollChange: false}, init: function () {
15        this.config = d.extend({}, this.defaults, this.options, this.metadata);
16        this.$nav = this.$elem.find(this.config.navItems);
17        if (this.config.filter !== "") {
18            this.$nav = this.$nav.filter(this.config.filter)
19        }
20        this.$nav.on("click.onePageNav", d.proxy(this.handleClick, this));
21        this.getPositions();
22        this.bindInterval();
23        this.$win.on("resize.onePageNav", d.proxy(this.getPositions, this));
24        return this
25    }, adjustNav: function (f, g) {
26        f.$elem.find("." + f.config.currentClass).removeClass(f.config.currentClass);
27        g.addClass(f.config.currentClass)
28    }, bindInterval: function () {
29        var g = this;
30        var f;
31        g.$win.on("scroll.onePageNav", function () {
32			jQuery('.tz-ladding-header').removeClass('active');
33            g.didScroll = true
34        });
35        g.t = setInterval(function () {
36            f = g.$doc.height();
37            if (g.didScroll) {
38                g.didScroll = false;
39                g.scrollChange()
40            }
41            if (f !== g.docHeight) {
42                g.docHeight = f;
43                g.getPositions()
44            }
45        }, 250)
46    }, getHash: function (f) {
47        return f.attr("href").split("#")[1];
48
49    }, getPositions: function () {
50        var h = this;
51        var i;
52        var g;
53        var f;
54        h.$nav.each(function () {
55            i = h.getHash(d(this));
56            f = d("#" + i);
57            if (f.length) {
58                g = f.offset().top;
59                h.sections[i] = Math.round(g)
60            }
61        })
62    }, getSection: function (i) {
63        var f = null;
64        var h = Math.round(this.$win.height() * this.config.scrollThreshold);
65        for (var g in this.sections) {
66            if ((this.sections[g] - h) < i) {
67                f = g
68            }
69        }
70        return f
71    }, handleClick: function (j) {
72        var g = this;
73        var f = d(j.currentTarget);
74        var i = f.parent();
75        var h = "#" + g.getHash(f);
76        if (!i.hasClass(g.config.currentClass)) {
77            if (g.config.begin) {
78                g.config.begin()
79            }
80            g.adjustNav(g, i);
81            g.unbindInterval();
82            g.scrollTo(h, function () {
83                if (g.config.changeHash) {
84                    c.location.hash = h
85                }
86                g.bindInterval();
87                if (g.config.end) {
88                    g.config.end()
89                }
90            })
91        }
92        j.preventDefault()
93    }, scrollChange: function () {
94        var h = this.$win.scrollTop();
95        var f = this.getSection(h);
96        var g;
97        if (f !== null) {
98            g = this.$elem.find('a[href$="#' + f + '"]').parent();
99            if (!g.hasClass(this.config.currentClass)) {
100                this.adjustNav(this, g);
101                if (this.config.scrollChange) {
102                    this.config.scrollChange(g)
103                }
104            }
105        }
106    }, scrollTo: function (f, h) {
107        var g = d(f).offset().top;
108        d("html, body").animate({scrollTop: g-70}, this.config.scrollSpeed, this.config.easing, h)
109    }, unbindInterval: function () {
110        clearInterval(this.t);
111        this.$win.unbind("scroll.onePageNav")
112    }};
113    b.defaults = b.prototype.defaults;
114    d.fn.onePageNav = function (f) {
115        return this.each(function () {
116            new b(this, f).init()
117        })
118    }
119})(jQuery, window, document);

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.