PageSourceSearch

https://www.indjijatravel.rs/wp-content/plugins/letsgo-plus/modules/menu/assets/js/mega-menu.js?ver=1.0.2

js indjijatravel.rs collected 2026-10-02 23:38:24 UTC 3,754 bytes, 95 lines download raw bytes

1jQuery.noConflict();
2jQuery(document).ready(function($) {
3    "use strict";
4
5    // Sticky Row
6    if( $("#header-wrapper .sticky-header").length > 0 ) {
7        var $sticky_header_cloned = $('.sticky-header').clone();
8        $sticky_header_cloned.removeClass('sticky-header').addClass('sticky-header-active');
9        $( $sticky_header_cloned ).insertAfter( $('.sticky-header') );
10
11        $sticky_header_cloned.find('.wdt-header-icons-list-item.search-item.search-overlay').each(function() {
12            var $searchContainer = $(this).find('.wdt-search-form-container');
13            if ($searchContainer.length) {
14                $searchContainer.remove(); 
15            }
16        });
17
18        $('body').css('--sticky-header-height', $('.sticky-header-active').outerHeight() + 'px');
19
20        var position = $(window).scrollTop();
21
22        $(window).scroll(function() {
23            var scroll = $(window).scrollTop();
24            if((scroll > 0 && position > 0) && scroll > position) {
25                $("#header-wrapper .sticky-header-active").addClass('wdt-header-top');
26                $("#header-wrapper .sticky-header-active").addClass('wdt-header-scroll');
27
28                $("#header-wrapper .sticky-header-active").show();
29            } else {
30                 $("#header-wrapper .sticky-header-active").removeClass('wdt-header-top');
31                 $("#header-wrapper .sticky-header-active").removeClass('wdt-header-scroll');
32            }
33            position = scroll;
34        });
35    }
36
37    function megaMenu() {
38    var $header_left = 0;
39    var $header_right = 0;
40    var isRTL = $('body').hasClass('rtl');
41
42    if ($("#header .container").length) {
43        var $header_container = $("#header .container");
44        $header_left = $header_container.offset().left;
45        $header_right = $(window).width() - ($header_left + $header_container.outerWidth());
46    }
47
48    $("li.has-mega-menu").each(function () {
49        var $parent = $(this),
50            $parent_left = $parent.offset().left,
51            $parent_width = $parent.outerWidth(),
52            $parent_right = $(window).width() - ($parent_left + $parent_width),
53            $sub_menu = $parent.children("ul.sub-menu"),
54            $section = $sub_menu.find('section');
55
56        if ($section.hasClass('elementor-section-stretched')) {
57            setTimeout(function () {
58                var windowWidth = $(window).width();
59                $sub_menu.css('width', parseInt(windowWidth));
60
61                if (isRTL) {
62                    $sub_menu.css({ right: -$parent_right, left: 'auto' });
63                    var pad = $sub_menu.css('padding-right');
64                    $section.css({ right: -(parseInt(pad)), left: 'auto' });
65                } else {
66                    $sub_menu.css({ left: -$parent_left, right: 'auto' });
67                    var pad = $sub_menu.css('padding-left');
68                    $section.css({ left: -(parseInt(pad)), right: 'auto' });
69                }
70            }, 100);
71        } else {
72            if (isRTL) {
73                $sub_menu.css({ right: ($header_right - $parent_right), left: 'auto' });
74            } else {
75                $sub_menu.css({ left: ($header_left - $parent_left), right: 'auto' });
76            }
77
78            if (!$("#header .container").length) {
79                $sub_menu.css('width', document.documentElement.clientWidth);
80            } else {
81                var parentElement = document.querySelector("#header .container");
82                var parentElementWidth = parentElement.clientWidth;
83                $("li.has-mega-menu").find("ul.sub-menu").css('width', parentElementWidth);
84            }
85        }
86    });
87}
88
89
90    megaMenu();
91
92    $(window).on("resize", function() {
93        megaMenu();
94    });
95});

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.