PageSourceSearch

https://eyeworldvision.com/plugins/smb/navigation/components/navigation/assets/js/navigation.js?v.1.0.84

js eyeworldvision.com collected 2026-09-29 15:18:46 UTC 3,316 bytes, 83 lines download raw bytes

1(function($) {
2    "use strict";
3
4    //SMBWMGR-7625- hide mmenu before init on theme level
5    const navStyle = $('<style type="text/css">.mm-menu.mm-offcanvas { display: none; }</style>');
6    $('html > head').append(navStyle);
7
8    function initNavs() {
9        // add title attributes to mobile menu (mm-menu) no text links - SMBWMGR-3784
10        $("nav.mm-menu a.mm-prev").each(function() {
11            const title = $(this).parent().find("a.mm-title").text();
12            $(this).attr("title", title);
13        });
14        $("nav.mm-menu a.mm-next").each(function() {
15            const title = $("> a[data-title]", $(this).parent()).data('title');
16            $(this).attr("title", title);
17        });
18        if ($("nav.mm-menu a.mm-close").length > 0) {
19            $("nav.mm-menu a.mm-close").attr("title", 'Close');
20        }
21
22        closeToTheEdge();
23    }
24
25    // New instance
26    $(document).ready(function() {
27        //sticky nav
28        $("[data-sticky-header]").closest('.js-sticky-nav').sticky({ topSpacing: 0 });
29
30        $('.navigation__item.more').click(function(e) {
31            e.preventDefault();
32        });
33
34        $('.more_nav--loading').removeClass('more_nav--loading');
35        initNavs();
36    });
37
38    $(window).load(function () {
39        initNavs();
40    });
41
42    function closeToTheEdge() {
43        /* Add sub item class if too close to edges */
44        const $navA = $('.navigation-a');
45        if ($navA.length) {
46            $('.navigation-a > .navigation__list > .navigation__item.has-drop-down').on('mouseenter mouseleave', function(e) {
47
48                const $this = $(this);
49                const $navListChildItem = $this.find('> .navigation__list--sub');
50                const $navListChildSubItem = $navListChildItem.find('> .navigation__item.has-drop-down > .navigation__list--sub');
51                const $navListGrandChildSubItem = $navListChildSubItem.find('> .navigation__item.has-drop-down > .navigation__list--sub');
52                const widthChildItem = $navListChildItem.outerWidth(true);
53                const navListSub_offsetLeft = $this.offset().left;
54                const buffer = 60;
55                let navListSub_width = 0;
56
57                let maxWidthChildSubItem = 0;
58                $($navListChildSubItem).each(function() {
59                    const thisW = $(this).outerWidth(true);
60                    if (thisW > maxWidthChildSubItem) { maxWidthChildSubItem = thisW; }
61                });
62
63                let maxWidthGrandChildSubItem = 0;
64                $($navListGrandChildSubItem).each(function() {
65                    const thisW = $(this).outerWidth(true);
66                    if (thisW > maxWidthGrandChildSubItem) { maxWidthGrandChildSubItem = thisW; }
67                });
68
69                navListSub_width = (widthChildItem + maxWidthChildSubItem + maxWidthGrandChildSubItem) - $this.outerWidth(true);
70
71                const offsetRight = ($(document).width() - (navListSub_offsetLeft + $this.outerWidth(true) + buffer));
72                const isEntirelyVisible = (offsetRight > navListSub_width);
73
74                if (isEntirelyVisible) {
75                    $this.removeClass('near-edge');
76                } else {
77                    $this.addClass('near-edge');
78                }
79            });
80        }
81    }
82
83})(window.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.