PageSourceSearch

https://rubyzoomsolutions.com/wp-content/plugins/themesflat-addons…/assets/js/tf-navmenu.js?ver=6.8

js rubyzoomsolutions.com collected 2026-10-10 02:03:46 UTC 4,967 bytes, 117 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10;(function($) {
11
12    "use strict";
13
14    var tf_responsive_menu = function() {
15        
16        $('.tf-nav-menu').each(function(){
17            var $this = $(this).data('id_random'),
18            $tf_nav_menu = $('.'+$this),
19            $btn_menu_mobile = $('.'+$this).find('.btn-menu-mobile'),
20            $close_menu_panel_style_default = $('.'+$this).find('.close-menu-panel-style-default'),
21            $btn_menu_only = $('.'+$this).find('.btn-menu-only'),
22            $mobile_menu_overlay = $('.'+$this).find('.mobile-menu-overlay'),
23            $mobile_menu_close = $('.'+$this).find('.tf-close');
24
25            $('.'+$this).find('.btn-submenu').remove();
26            var hasChildMenu = $tf_nav_menu.find('.mainnav-mobi').find('li:has(ul)');
27            hasChildMenu.children('ul').hide();                                    
28            hasChildMenu.children('a').after('<span class="btn-submenu"><i class="fa fa-angle-down" aria-hidden="true"></i></span>');
29
30            var menuType = 'desktop';
31            $(window).on('load resize', function() {
32                var currMenuType = 'desktop';
33
34                if ( matchMedia( 'only screen and (max-width: 991px)' ).matches ) {                
35                    currMenuType = 'mobile';
36                }
37
38                if ( currMenuType !== menuType ) {
39                    menuType = currMenuType;
40                } else {                             
41                    $('.'+$this).find('.mobile-menu-overlay').removeClass('active');
42                    $('.'+$this).find('.nav-panel').removeClass('active');      
43                }
44
45            });
46
47            $(document).on('click', '.mainnav-mobi li .btn-submenu', function(e) {
48                $(this).toggleClass('active').next('ul').slideToggle(300);
49                e.stopImmediatePropagation();
50                e.preventDefault();
51            }); 
52
53            //Open Nav
54            $($btn_menu_mobile).on('click', function() {                
55                $(this).addClass('active');
56                $(this).siblings().addClass('active');
57            });             
58
59            //Close Nav
60            $($close_menu_panel_style_default).on('click', function() {             
61                $(this).closest('.nav-panel').removeClass('active');             
62                $(this).closest('.nav-panel').siblings().removeClass('active');           
63            });
64
65            $($mobile_menu_overlay).on('click', function() {             
66                $(this).siblings().removeClass('active');            
67                $(this).removeClass('active');            
68            });
69
70            $($mobile_menu_close).on('click', function() {             
71                $(this).siblings().removeClass('active');            
72                $(this).removeClass('active');            
73            }); 
74
75            $($btn_menu_only).on('click', function() { 
76                $(this).siblings().addClass('active');
77            });
78
79
80            
81        });        
82                         
83    }
84
85    var tf_onepage_nav = function () {
86        $('.tf-nav-menu.has-one-page .mainnav > ul > li > a').on('click',function(e) {
87
88            var anchor = $(this).attr('href').split('#')[1];            
89            var largeScreen = matchMedia('only screen and (min-width: 992px)').matches;
90            var headerHeight = 0;
91            headerHeight = $('.header').height();        
92            if ( anchor ) {
93                if ( $('#'+anchor).length > 0 ) {
94                   if ( $('.header-shadow').length > 0 ) {
95                        headerHeight = headerHeight;
96                   } else {
97                        headerHeight = 0;
98                   }                   
99                   var target = $('#'+anchor).offset().top - headerHeight;
100                   $('html,body').animate({scrollTop: target}, 1000, 'easeInOutExpo');
101                }
102            }
103
104            e.preventDefault();
105
106        });
107    } 
108
109$(window).on('elementor/frontend/init', function() {
110    elementorFrontend.hooks.addAction( 'frontend/element_ready/tf-nav-menu.default', tf_responsive_menu );  
111    elementorFrontend.hooks.addAction( 'frontend/element_ready/tf-nav-menu.default', tf_onepage_nav );
112});
113
114})(jQuery);
115}
116
117

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.