PageSourceSearch

https://sostinestauras.lt/wp-content/plugins/rt-mega-menu/public/assets/js/rtmega-menu-public.js?ver=1.2.7

js sostinestauras.lt collected 2026-10-04 13:30:12 UTC 4,341 bytes, 97 lines download raw bytes

1function openRTMEGAmobile() { 
2    document.querySelector('.enabled-mobile-menu .mobile-menu-area').classList.add('opened');
3    event.preventDefault();
4}
5
6function closeRTMEGAmobile() { 
7    document.querySelector('.enabled-mobile-menu .mobile-menu-area').classList.remove('opened');
8    event.preventDefault();
9}
10
11
12(function($) {
13
14    RTmegaMenu = {
15        init: function () {
16            this.enableAccordion();
17            this.enableHeaderScript();
18            $( document )
19            .on( 'click.RTmegaMenu', '.rtmega-menu-vertical-expand-button-wrapper a', this.expandVerticalMenu )
20        },
21        expandVerticalMenu: function(e){
22            e.preventDefault();
23            let widgetID = $(this).attr('widget_id');
24            console.log(widgetID);
25            $('.enabled-vertical-menu .vertical-expaned-menu-area'+'.'+widgetID+ ' .rtmega-menu-vertical-expanded').toggleClass('opened');
26        },
27        enableAccordion: function(){
28            $(".rtmega-menu-area .mobile-menu-area .rtmega-megamenu .menu-item-has-children > .menu-link").removeAttr('href', '#');
29            if($(".rtmega-menu-area .mobile-menu-area .rtmega-menu-mobile-sidebar .rtmega-megamenu").length){
30                $(".rtmega-menu-area .mobile-menu-area .rtmega-menu-mobile-sidebar .rtmega-megamenu").mgaccordion({
31                    theme: 'tree',
32                });
33            }
34
35            if($(".rtmega-menu-area .rtmega-megamenu.vertical.vertical-submenu-expand-mode-click").length){
36                $(".rtmega-menu-area .rtmega-megamenu.vertical.vertical-submenu-expand-mode-click").mgaccordion({
37                    theme: 'tree',
38                });
39            }
40        },
41        enableHeaderScript: function () {
42            let headerInnerWidth = $('.header-inner .e-con > .e-con-inner').width();
43            $('.sub-menu.rtmegamenu-contents.full-width-mega-menu').css('width', headerInnerWidth+'px');
44            $('.sub-menu.rtmegamenu-contents.full-width-mega-menu').css('max-width', headerInnerWidth+'px');
45            $('.elementor-widget.elementor-widget-rt-mega-navigation-menu').css('position', 'static');
46            $('.elementor-widget.elementor-widget-rt-mega-navigation-menu').parent().css('position', 'static');
47
48            $(window).resize(function(){
49                let headerInnerWidth = $('.header-inner .e-con > .e-con-inner').width();
50                $('.sub-menu.rtmegamenu-contents.full-width-mega-menu').css('width', headerInnerWidth+'px');
51                $('.sub-menu.rtmegamenu-contents.full-width-mega-menu').css('max-width', headerInnerWidth+'px');
52            });
53        }
54    }
55    
56    RTmegaMenu.init();
57
58
59    if ($('.rtmega-menu-vertical-expanded').length) {
60        function closeRTMEGAmobile_top() {
61            $(".rtmega-menu-vertical-expanded").removeClass("opened");
62        }
63        $(".rtmega-menu-top-cls").click(closeRTMEGAmobile_top);
64    }
65
66
67    if ($('.expand-position-top').length) {
68        function closeRTMEGAmobile_top_cls() {            
69           $(".rtmega-menu-top-cls").removeClass("top-opened");
70        }
71        $(document).on("click", ".rtmega-menu-top-style-cls", closeRTMEGAmobile_top_cls);
72    }
73
74    if ($('.expand-position-top').length) {
75        $(".expand-position-top ul.rtmega-megamenu .menu-item .menu-text span:not(.submenu-parent-icon), .rtmega-menu-top-cls").on("click", function () {
76           $(".rtmega-menu-top-cls").hide();
77        });
78        $(".rtmega-menu-mobile-button").on("click", function () {
79           $(".rtmega-menu-top-cls").show();
80        });
81    }
82
83    if ($('.expand-position-top').length) {
84        function closeRTMEGAmobile_top_clopen() {            
85           $(".rtmega-menu-top-style-cls").addClass("top-opened");
86        }
87        $(document).on("click", ".enabled-vertical-menu", closeRTMEGAmobile_top_clopen);
88    }
89
90    if ($('.mobile-menu-area, .expand-position-top').length) {
91        function closeRTMEGAmobile_mobile_close() {
92            $(".mobile-menu-area, .expand-position-top").removeClass("opened");
93        }
94        $("ul.rtmega-megamenu .menu-item:not(.menu-item-has-children) .menu-text span:not(.submenu-parent-icon), .expand-position-top ul.rtmega-megamenu .menu-item:not(.menu-item-has-children) .menu-text span:not(.submenu-parent-icon)").click(closeRTMEGAmobile_mobile_close);
95    }
96
97})(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.