PageSourceSearch

https://workplacely.com/wp-content/plugins/theplus_elementor_addon…/plus-nav-menu.min.js?ver=1736513453

js workplacely.com collected 2026-10-08 09:51:33 UTC 20,550 bytes, 518 lines download raw bytes

1/*Navigation Menu*/(function ($) {
2	'use strict';
3	$(document).ready(function () {
4		if($(".plus-navigation-wrap .plus-navigation-inner.menu-click").length>=1){
5			theplus_ele_menu_clicking();
6		}
7		
8		$(".plus-navigation-wrap .menu-item a").each(function(){
9			var title = $(this).attr("title");
10			$(this).attr("tmp_title", title);
11			$(this).attr("title","");
12		});
13		
14		if($(".mobile-plus-toggle-menu").length > 0){
15			$(".mobile-plus-toggle-menu").on('click',function() {
16				var target = $(this).data("target");
17				$(this).toggleClass("plus-collapsed");
18				if ($(target +'.collapse:not(".in")').length) {
19				  
20				  $(target +'.collapse:not(".in")').slideDown(400);
21				  $(target +'.collapse:not(".in")').addClass('in');
22				} else {
23				  $(target + '.collapse.in').slideUp(400);
24				  $(target +'.collapse.in').removeClass('in');
25				}
26			});
27		}
28		$(".plus-mobile-menu:not(.swiper-wrapper) .navbar-nav li.menu-item-has-children > a,.plus-mobile-menu:not(.swiper-wrapper) .navbar-nav li.dropdown-submenu > a").on("click", function(a) {
29            a.preventDefault(),
30            a.stopPropagation();
31            var b = $(this)
32              , c = b.parent()
33              , d = b.parent().parent()
34              , e = c.find("> ul.dropdown-menu");
35            c.hasClass("open-menu") ? (e.slideUp(400),
36            c.removeClass("open-menu")) : (d.css("height", "auto"),
37            d.find("li.dropdown.open-menu ul.dropdown-menu").slideUp(400),
38            d.find("li.dropdown-submenu.open-menu ul.dropdown-menu").slideUp(400),
39            d.find("li.dropdown,li.dropdown-submenu.open-menu").removeClass("open-menu"),
40            e.slideDown(400),
41            c.addClass("open-menu"));
42			
43			if(e.find('.list-isotope').length){
44				setTimeout(function(){
45					e.find('.list-isotope .post-inner-loop').isotope('layout');
46				}, 420);
47			}
48			if(e.find('.list-isotope-metro .post-inner-loop').length > 0){
49				theplus_setup_packery_portfolio('all');		
50			}	
51        });
52		$(".plus-navigation-wrap .plus-dropdown-default").each(function(){
53			var mwidth= $(this).data("dropdown-width");
54			var id= $(this).attr("id");
55			if(mwidth!='' && mwidth!=undefined){
56				$('head').append('<style>#'+id+'.plus-dropdown-default.plus-fw > ul.dropdown-menu{max-width:'+mwidth+' !important;min-width:'+mwidth+' !important;right:auto;}#'+id+'.plus-dropdown-default:not(.plus-fw) > ul.dropdown-menu{max-width:'+mwidth+' !important;min-width:'+mwidth+' !important;width: 100%;}</style>');
57			}
58		});
59		if($(".plus-navigation-menu.menu-vertical-side.toggle-type-click").length > 0){
60			$(".menu-vertical-side.toggle-type-click .plus-vertical-side-toggle").on("click",function(a){
61				a.preventDefault(),
62				a.stopPropagation();
63				$(this).closest(".toggle-type-click").toggleClass("tp-click");
64			});
65		}
66		if($(".plus-navigation-menu.menu-vertical-side.toggle-type-hover").length > 0){
67			$(".menu-vertical-side.toggle-type-hover").on('mouseenter',function() {
68				$(this).addClass("tp-hover");
69			}).on('mouseleave', function() {
70				$(this).removeClass("tp-hover");
71			});
72		}
73	});
74    
75	var inner_width = window.innerWidth;
76		if(inner_width <= 991 && $('.plus-mobile-menu-content').length){
77			$(document).mouseup(function (e) {
78				var container = $(".mobile-plus-toggle-menu");
79				var mouse_click = $(e.target).find(".plus-navigation-inner").data("mobile-menu-click");
80				if(mouse_click=='yes'){					
81					if (!container.is(e.target) && container.has(e.target).length === 0){
82						var $menu = $('li.dropdown');
83						if (!$menu.is(e.target) && $menu.has(e.target).length === 0){
84							$menu.find('ul.dropdown-menu').slideUp(400);
85							$menu.find('li.dropdown-submenu.open-menu ul.dropdown-menu').slideUp(400);
86							$menu.removeClass('open-menu');
87							$(e.target).find(".plus-mobile-menu-content").slideUp(400);
88							$(e.target).find(".plus-mobile-menu-content").removeClass('in');
89							$(e.target).find(".plus-navigation-inner").find(".mobile-plus-toggle-menu").addClass("plus-collapsed");
90                            if($(e.target).find(".plus-mobile-menu-content").hasClass('plus-menu-off-canvas')){
91                                $(e.target).find(".plus-mobile-menu-content").removeClass('is-active');
92                            }
93						}
94					}
95				}
96			});
97		}
98	
99	/*--Normal menu and Normal Bottom menu hover effect--*/
100	var id;
101	$(window).on("load resize",function(e){
102		e.preventDefault();
103		var inner_width = window.innerWidth;
104		if(inner_width > 991){
105			if($(".plus-navigation-wrap .plus-navigation-inner").hasClass("menu-hover")){
106				theplus_navmenu_hover();
107			}
108		}
109		
110		//Mobile Menu Full Width
111		if($('.plus-mobile-menu-content:not(.nav-cust-width)').length){
112			$(".plus-mobile-menu-content:not(.plus-menu-off-canvas)").each(function(){
113				var offeset=$(this).closest(".plus-navigation-wrap");
114				var window_width = $(window).width();
115				var menu_content=$(this);
116				var offset_left = 0 - offeset.offset().left;
117				
118					if($('body').hasClass("rtl")){
119						menu_content.css({
120								right: offset_left,
121								"box-sizing": "border-box",
122								width: window_width
123						});
124					}else{
125						menu_content.css({
126								left: offset_left,
127								"box-sizing": "border-box",
128								width: window_width
129						});
130					}
131					
132			});
133		}
134		theplus_megamenu_fullwidth_container();
135	});
136} )(jQuery);
137function theplus_navmenu_hover(){
138	"use strict";
139	var $= jQuery;	
140	$(".plus-navigation-wrap .menu-hover .navbar-nav .dropdown").on('mouseenter',function() {
141		var $container =$(this).closest(".plus-navigation-inner");
142		var transition_style=$container.data("menu_transition");
143		
144		if(transition_style=='' || transition_style=='style-1'){
145			$(this).find("> .dropdown-menu").stop().slideDown();
146		}else if(transition_style=='style-2'){
147			$(this).find("> .dropdown-menu").stop(true, true).delay(100).fadeIn(600);
148		}else if(transition_style=='style-3' || transition_style=='style-4'){
149			$(this).find("> .dropdown-menu").addClass("open-menu");			
150		}
151		
152		if($('.list-isotope-metro .post-inner-loop',this).length > 0){
153			theplus_setup_packery_portfolio('all');		
154		}
155		
156	}).on('mouseleave', function() {
157		var $container =$(this).closest(".plus-navigation-inner");
158		var transition_style=$container.data("menu_transition");
159		
160		if(transition_style=='' || transition_style=='style-1'){
161			$(this).find("> .dropdown-menu").stop().slideUp();
162		}else if(transition_style=='style-2'){
163			$(this).find("> .dropdown-menu").stop(true, true).delay(100).fadeOut(400);
164		}else if(transition_style=='style-3' || transition_style=='style-4'){
165			$(this).find("> .dropdown-menu").removeClass("open-menu");			
166		}
167		
168	});
169	$(".plus-navigation-wrap .menu-hover .navbar-nav .dropdown-submenu").on('mouseenter',function() {
170		var $container =$(this).closest(".plus-navigation-inner");
171		var transition_style=$container.data("menu_transition");
172		
173		if($('.list-isotope-metro .post-inner-loop',this).length > 0){
174			theplus_setup_packery_portfolio('all');	
175		}
176		
177		if(transition_style=='' || transition_style=='style-1'){
178			$(this).find("> .dropdown-menu").stop().slideDown();
179		}else if(transition_style=='style-2'){
180		$(this).find("> .dropdown-menu").stop(true, true).delay(100).fadeIn(600);
181		}else if(transition_style=='style-3' || transition_style=='style-4'){
182			$(this).find("> .dropdown-menu").addClass("open-menu");
183		}
184		
185	}).on('mouseleave', function() {
186		var $container =$(this).closest(".plus-navigation-inner");
187		var transition_style=$container.data("menu_transition");
188		
189		if(transition_style=='' || transition_style=='style-1'){
190			$(this).find("> .dropdown-menu").stop().slideUp();
191		}else if(transition_style=='style-2'){
192			$(this).find("> .dropdown-menu").stop(true, true).delay(100).fadeOut(400);
193		}else if(transition_style=='style-3' || transition_style=='style-4'){
194			$(this).find("> .dropdown-menu").removeClass("open-menu");
195		}
196		
197	});	
198}
199function theplus_megamenu_fullwidth_container(){
200	"use strict";
201	var $=jQuery;
202	if($('.plus-navigation-menu .plus-dropdown-container').length > 0 || $('.plus-navigation-menu .plus-dropdown-full-width').length > 0){
203	
204		var left_offset=0;
205	
206		if( $('.plus-navigation-menu .plus-dropdown-container').length > 0 ) {
207			$('.plus-navigation-menu .plus-dropdown-container').each(function(){
208				var cthis =$(this);
209				//Horizontal Menu
210				var vertical_menu = cthis.closest('.menu-vertical-side');
211				if(vertical_menu.length>0){
212					var full_width=cthis.closest(".elementor-container").width();
213					var menu_width = vertical_menu.find(".navbar-nav").width();
214					var con_width = full_width - menu_width - 20;
215					var container_megamenu=$(">.dropdown-menu",cthis);
216					container_megamenu.css({
217							"box-sizing": "border-box",
218							width: con_width
219					});
220				}
221				if(!vertical_menu.length){
222					var cont_width=cthis.closest(".elementor-container").width();
223					var window_width = window.innerWidth;
224					window_width=window_width-cont_width;
225					var left_offset=window_width/2;
226					
227					var offeset=cthis.closest(".plus-navigation-wrap");
228					
229					
230					var container_megamenu=$(">.dropdown-menu",cthis);
231					if($('body').hasClass("rtl")){
232					var offset_right = 0 - offeset.offset().left+(left_offset);
233						container_megamenu.css({
234							right: offset_right,
235							"box-sizing": "border-box",
236							width: cont_width
237						});
238					}else{
239					var offset_left = 0 - offeset.offset().left+(left_offset);
240						container_megamenu.css({
241							left: offset_left,
242							"box-sizing": "border-box",
243							width: cont_width
244						});
245					}
246				}
247			});
248		}
249		if( $('.plus-navigation-menu .plus-dropdown-full-width').length > 0 ) {
250			$('.plus-navigation-menu .plus-dropdown-full-width').each(function(){
251				var cthis =$(this);
252				var vertical_menu = cthis.closest('.menu-vertical-side');
253				if(vertical_menu.length>0){
254					var full_width=cthis.closest(".elementor-container").width();
255					var menu_width = vertical_menu.find(".navbar-nav").width();
256					var con_width = full_width - menu_width - 20;
257					var container_megamenu=$(">.dropdown-menu",cthis);
258					container_megamenu.css({
259							"box-sizing": "border-box",
260							width: con_width
261					});
262				}
263				if(!vertical_menu.length){
264					var full_width=cthis.closest(".elementor-container").width();
265					var window_width = $(window).width();
266					//window_width=window_width-full_width;
267					var offeset=cthis.closest(".plus-navigation-wrap");
268					if(offeset.length > 0){
269						var offset_left = 0 - offeset.offset().left-(left_offset);
270					}else{
271						var offset_left = 0 - 0+(left_offset);
272					}
273					if($('body').hasClass("rtl")){
274						var offset_left = 0 - (window_width - (offeset.offset().left + offeset.width()));
275					}
276					var container_megamenu=$(">.dropdown-menu",cthis);
277					
278					if($('body').hasClass("rtl")){
279						container_megamenu.css({
280								right: offset_left,
281								"box-sizing": "border-box",
282								width: window_width
283						});
284					}else{
285						container_megamenu.css({
286								left: offset_left,
287								"box-sizing": "border-box",
288								width: window_width
289						});
290					}
291				}
292			});
293		}
294		
295	}
296}
297function theplus_ele_menu_clicking(){
298	"use strict";	
299	var $=jQuery;
300		$('.plus-navigation-wrap .menu-click .plus-navigation-menu .navbar-nav li.menu-item-has-children > a,.plus-navigation-wrap .menu-click .plus-navigation-menu .plus-mobile-menu.plus-menu-off-canvas .navbar-nav li.menu-item-has-children > a').on('click', function (event) {
301			event.preventDefault(); 
302			event.stopPropagation();
303			if($(this).closest(".plus-navigation-inner.menu-click")){
304				var navSideBut = $(this), 
305				navSideItem = navSideBut.parent(),
306				navSideUl = navSideBut.parent().parent(),
307				navSideItemSub = navSideItem.find('> ul.dropdown-menu');
308
309				if (navSideItem.hasClass('open-menu')) {
310					navSideItemSub.slideUp(400);					
311					navSideItem.removeClass('open-menu');
312				} else {
313					navSideUl.css("height","auto");
314					navSideUl.find('li.dropdown.open-menu ul.dropdown-menu').slideUp(400);
315					navSideUl.find('li.dropdown-submenu.open-menu ul.dropdown-menu').slideUp(400);
316					navSideUl.find('li.dropdown,li.dropdown-submenu.open-menu').removeClass('open-menu');
317					navSideItemSub.slideDown(400);					
318					navSideItem.addClass('open-menu');
319                    navSideItemSub.addClass('open-menu');
320					if(navSideItem.find('.list-isotope-metro .post-inner-loop').length > 0){
321						theplus_setup_packery_portfolio('all');		
322					}	
323				}
324			}	
325			
326		});
327		$(document).mouseup(function (e) {
328			var $menu = $('li.dropdown');
329			if (!$menu.is(e.target) && $menu.has(e.target).length === 0){
330				$menu.find('ul.dropdown-menu').slideUp(400);
331				$menu.find('li.dropdown-submenu.open-menu ul.dropdown-menu').slideUp(400);
332				$menu.removeClass('open-menu');			
333		   }
334		});
335}
336(function ($) {
337	'use strict';	
338	var WidgetHeaderNavigation = function($scope, $) {
339
340		var $plus_navigation = $scope.find('.plus-navigation-wrap'),
341			getlink = $plus_navigation[0].querySelectorAll('.plus-navigation-menu.menu-horizontal .menu-item a');  
342
343			if( getlink.length > 0 ){
344				getlink.forEach(function(self){
345					if(window.location.href == self.href){
346						self.parentElement.classList.add('active');
347					}
348				})
349			}
350
351		if($plus_navigation.find(".hamburger-off-canvas").length > 0){
352			$(document).on('click','.hamburger-off-canvas ',function(){ 
353                $(this).addClass("open-menu");
354                $('body').addClass('mobile-menu-open');
355                var b = $(this),
356                c = b.parent().parent();
357                c.find('.plus-mobile-menu.plus-menu-off-canvas').addClass('is-active');
358            })
359            $(document).on('click','.mobile-menu-open','.plus-mobile-menu.plus-menu-off-canvas .close-menu',function(){
360                var p = $(this),
361                c = p.find('.plus-mobile-menu.plus-menu-off-canvas'),
362                d = c.parent();
363                if(c.hasClass('is-active')) {
364                    c.removeClass('is-active in');
365                    p.removeClass('mobile-menu-open');
366                    d.find(".hamburger-off-canvas").removeClass('open-menu').addClass('plus-collapsed');
367                }
368            });
369		}
370		if($plus_navigation.find(".hover-inverse-effect").length >0){
371			$(".plus-navigation-menu .nav > li > a").on({
372			  mouseenter: function() {
373				$( this ).closest(".hover-inverse-effect").addClass("is-hover-inverse");
374				$( this ).addClass( "is-hover" );
375			  }, mouseleave: function() {
376				$( this ).closest(".hover-inverse-effect").removeClass("is-hover-inverse");
377				$( this ).removeClass( "is-hover" );
378			  }
379			});
380		}
381		if($plus_navigation.find(".submenu-hover-inverse-effect").length >0){
382			$(".plus-navigation-menu .nav li.dropdown .dropdown-menu > li > a").on({
383			  mouseenter: function() {
384				$( this ).closest(".submenu-hover-inverse-effect").addClass("is-submenu-hover-inverse");
385				$( this ).addClass( "is-hover" );
386			  }, mouseleave: function() {
387				$( this ).closest(".submenu-hover-inverse-effect").removeClass("is-submenu-hover-inverse");
388				$( this ).removeClass( "is-hover" );
389			  }
390			});
391		}
392		
393		var inner_width = window.innerWidth;
394		if(inner_width > 991){
395			if($plus_navigation.find(".plus-navigation-inner").hasClass("menu-hover")){
396				theplus_navmenu_hover();
397			}
398		}
399		theplus_megamenu_fullwidth_container();
400		//add class megamenu
401		$plus_navigation.find(".nav>li .dropdown-menu").each(function(){
402			var $this= $(this);
403			var $megamenu_content=$this.find(".plus-megamenu-content");
404			var $full_width_content=$this.closest(".plus-dropdown-full-width");
405			var $container_content=$this.closest(".plus-dropdown-container");
406			if($megamenu_content.length > 0 || $full_width_content.length || $container_content.length){
407				var $closest_class=$this.closest(".dropdown");
408				$closest_class.addClass("plus-fw");
409			}
410		});
411		if($('.plus-mobile-menu-content.swiper-container').length > 0){
412			new Swiper(".plus-mobile-menu-content.swiper-container",{
413				slidesPerView: "auto",
414				mousewheelControl: !0,
415				freeMode: !0
416			});
417		}
418		
419		//navigation Sticky Opt
420		if($plus_navigation.length > 0){
421			var inner=$plus_navigation.find('.plus-navigation-inner'),
422				nav_sticky=inner.data('nav-sticky'),
423				nav_sticky_osup=inner.data('nav-sticky-osup'),
424				nav_sticky_id=inner.data('wid');
425			
426			
427			if (nav_sticky!=undefined && nav_sticky=='yes' && nav_sticky_id!='') {
428				var sec_id = $plus_navigation.closest(".elementor-element.elementor-section:not(.elementor-inner-section),.elementor-element.e-container,.elementor-element.e-con").addClass("plus-nav-sticky-sec").data("id");
429				if(inner_width > 801 && $plus_navigation.closest(".elementor-element.elementor-section:not(.elementor-inner-section):not(.elementor-hidden-desktop),.elementor-element.e-container,.elementor-element.e-con").length){				
430					$plus_navigation.append('<div class="plus-nav-sticky ' + nav_sticky_id + "-" + sec_id + '"></div>');
431				}
432				if(inner_width < 800 && inner_width > 768 && $plus_navigation.closest(".elementor-element.elementor-section:not(.elementor-inner-section):not(.elementor-hidden-tablet),.elementor-element.e-container,.elementor-element.e-con").length){
433					$plus_navigation.append('<div class="plus-nav-sticky ' + nav_sticky_id + "-" + sec_id + '"></div>');
434				}
435				
436				if(inner_width < 767 && $plus_navigation.closest(".elementor-element.elementor-section:not(.elementor-inner-section):not(.elementor-hidden-phone),.elementor-element.e-container,.elementor-element.e-con").length){
437					$plus_navigation.append('<div class="plus-nav-sticky ' + nav_sticky_id + "-" + sec_id + '"></div>');
438				}				
439                
440                var sec_class = ".elementor-element-" + sec_id;
441                $(".plus-nav-sticky." + nav_sticky_id + "-" + sec_id).insertBefore(sec_class), $(window).on("load scroll", function() {
442                    var n = $(sec_class).outerHeight(),
443                        o = $(".plus-nav-sticky." + nav_sticky_i
443d + "-" + sec_id).length ? $(".plus-nav-sticky." + nav_sticky_id + "-" + sec_id).offset().top : 0,
444                        i = $(".plus-nav-sticky." + nav_sticky_id + "-" + sec_id);
445                    $(window).scrollTop() > o ? (i.css("min-height", n), $(sec_class).addClass("plus-fixed-sticky")) : (i.css("min-height", 0), $(sec_class).removeClass("plus-fixed-sticky"))
446					/*On Mouse Scroll Up Sticky*/
447					if(nav_sticky_osup!=undefined && nav_sticky_osup=='yes'){
448						(function() {
449							var header = new Headroom(document.querySelector(sec_class), {       
450								tolerance: 5,
451								classes: {
452								  initial: "animated",
453								  pinned: "slideDown",
454								  unpinned: "slideUp"
455								}
456							});
457							header.init();
458							
459						}());
460					}
461					/*On Mouse Scroll Up Sticky*/
462                })
463            }
464		}
465		
466		/* AccessibilityMenu Code */
467		$scope[0].addEventListener("keyup", function(e){
468			e.preventDefault();
469			e.stopPropagation();			
470            MenuAccessibility(e,this);
471		});
472
473		let Tempblock = [];
474        function MenuAccessibility (event, $this) {
475            let GetMenu = $this.querySelectorAll('.dropdown-toggle');
476				//event.which == 13 &&
477                if( event.target.nextElementSibling){
478                    event.target.nextElementSibling.style.display = "block";
479					Tempblock.push(event.target.nextElementSibling);
480                }
481				
482                if( GetMenu.length && event.target.nextElementSibling ){
483					if(event.which == 27){
484						if(Tempblock.length > 0){
485							Tempblock.forEach(function(self) {
486								self.style.display = "none";
487							});
488						}
489					}
490
491                    if(event.which == 9){
492						if(event.target.classList.contains("dropdown-toggle")){
493							GetMenu.forEach(function(self) {
494								if(event.target !== self){
495									self.nextElementSibling.style.display = "none";
496								}
497							});
498						}
499
500						if(event.target.parentElement.classList.contains("dropdown-submenu")){
501							let gg = event.target.parentElement.closest('ul.dropdown-menu').querySelectorAll('li');
502								gg.forEach(function(self) {
503									if(self != event.target.parentElement && self.querySelectorAll('ul.dropdown-menu').length > 0){
504										self.querySelector('ul.dropdown-menu').style.display = "none";
505									}
506								});
507						}
508                    }
509                }
510        }		
511
512	};
513	
514	$(window).on('elementor/frontend/init', function () {
515		elementorFrontend.hooks.addAction('frontend/element_ready/tp-navigation-menu.default', WidgetHeaderNavigation);
516	});
517
518})(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.