PageSourceSearch

https://www.maybemars.com/files/wp-content/themes/betheme/js/menu_ver-14.7.js

js maybemars.com collected 2026-10-02 12:42:46 UTC 3,173 bytes, 126 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/**
11 * MuffinMenu 
12 * 
13 * Horizontal Multilevel Menu with WP MegaMenu Support 
14 * 
15 * 3.0 | Muffin Group
16 */
17    
18;(function($){
19	"use strict";
20	
21	$.fn.mfnMenu = function( options ){
22
23		var menu = $(this);
24		
25		var defaults = {
26			addLast		: false,
27			arrows      : false,
28			delay       : 100,
29			hoverClass  : 'hover',
30			mobileInit	: 768,
31			responsive	: true
32		};
33		options = $.extend( defaults, options );
34		
35		
36		var init = function(){
37			
38			// add '.submenu' class
39			$( 'li:has(ul)', menu ).addClass( 'submenu' );
40			
41			// append mobile toggle button
42			$( 'li:has(ul)', menu ).append( '<span class="menu-toggle"></span>' );
43			
44			// add '.mfn-megamenu-parent' class
45			menu.children( 'li:has( ul.mfn-megamenu )' ).addClass( 'mfn-megamenu-parent' );	
46			
47			// add '.last-item' class
48			$( '.submenu ul li:last-child', menu ).addClass( 'last-item' );
49			
50			// add '.last' class
51			if( options.addLast ) {
52				$( '> li:last-child', menu ).addClass( 'last' )
53					.prev().addClass( 'last' );
54			}
55			
56			// appand submenu arrows
57			if( options.arrows ) {
58				$( 'li ul li:has(ul) > a', menu ).append( '<i class="menu-arrow icon-right-open"></i>' );
59			}
60
61		};
62		
63		
64		var doMenu = function(){
65
66			if( ( $(window).width() >= options.mobileInit ) || ( ! options.responsive ) ){
67				
68				// desktop --------------------------------
69
70				$( '> li, ul:not(.mfn-megamenu) li', menu ).hover(function() {
71					
72					$(this).stop(true,true).addClass( options.hoverClass );
73					
74					$(this).children( 'ul' ).stop(true,true).fadeIn( options.delay );
75					
76					
77				}, function(){
78					
79					$(this).stop(true,true).removeClass( options.hoverClass );
80					
81					$(this).children( 'ul' ).stop(true,true).fadeOut( options.delay );	
82					
83				});
84				
85			} else {
86
87				// mobile ---------------------------------
88				
89				$( 'li', menu ).unbind('hover');
90				
91				$( 'li > .menu-toggle', menu ).off('click').on('click', function(){
92	
93					var el = $(this).closest('li');
94					
95					if( el.hasClass( options.hoverClass ) ){
96	
97						el.removeClass( options.hoverClass )
98							.children('ul').stop(true,true).fadeOut( options.delay );			
99						
100					} else {
101		
102						el.addClass( options.hoverClass )
103							.children('ul').stop(true,true).fadeIn( options.delay );	
104	
105					}
106					
107				});
108				
109			}
110			
111		};
112		
113
114		$(window).bind( 'resize', doMenu );
115		
116		var __constructor = function(){
117			init();
118			doMenu();
119		};
120		
121		__constructor();
122
123	}
124
125})(jQuery);
126}

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.