1// Multi-Toggle Navigation 2var $ = jQuery; 3 4jQuery(function ($) { 5 6 'use strict'; 7 8 $('body').addClass('js'); 9 10 $(".navbar li").each(function () { 11 var each_li = $(this); 12 if (each_li.find('ul').length > 0) { 13 each_li.append("<span class='has-subnav'><i class='fa fa-angle-down'></i></span>"); 14 } 15 }); 16}); 17 18$(document).on("click", '.menu-link', function (e) { 19 e.preventDefault(); 20 var $ = jQuery; 21 if ($(this).hasClass('active')) { 22 $(this).removeClass('active'); 23 } else { 24 $(this).addClass('active'); 25 } 26 if ($('#menu').hasClass('active')) { 27 $('#menu').removeClass('active'); 28 } else { 29 $('#menu').addClass('active'); 30 } 31}); 32 33$(document).on("click", '.has-subnav', function (e) { 34 e.preventDefault(); 35 var $this = jQuery(this); 36 $this.parent('li').find('> ul').toggleClass('active'); 37}); 38 39jQuery(document).on('click', '.careerfy-nav-toogle', function () { 40 'use strict'; 41 var _this = jQuery(this); 42 var nav_bar = jQuery('.careerfy-nav-area'); 43 if (nav_bar.hasClass('nav-active')) { 44 nav_bar.removeClass('nav-active'); 45 _this.find('img').attr('src', careerfy_funnc_vars.nav_open_img); 46 nav_bar.hide('slide', {direction: 'left'}, 500); 47 } else { 48 nav_bar.addClass('nav-active'); 49 _this.find('img').attr('src', careerfy_funnc_vars.nav_close_img); 50 nav_bar.show("slide", {direction: "left"}, 500); 51 } 52}); 53 54 55jQuery(".navbar-nav .sub-menu").parent("li").addClass("submenu-addicon"); 56 57// 58jQuery(document).on('click', '.careerfy-wrapper', function(e) { 59 if (jQuery('.careerfy-mobile-hdr-sidebar').length > 0) { 60 var this_dom = e.target; 61 var thisdom_obj = jQuery(this_dom); 62 63 if (thisdom_obj.hasClass('mobile-navigation-togglebtn') || thisdom_obj.parents('a').hasClass('mobile-navigation-togglebtn')) { 64 return false; 65 } 66 if (thisdom_obj.hasClass('jobsearch-useracount-hdrbtn') || thisdom_obj.parents('a').hasClass('jobsearch-useracount-hdrbtn')) { 67 return false; 68 } 69 if (thisdom_obj.hasClass('mobile-usernotifics-btn') || thisdom_obj.parents('a').hasClass('mobile-usernotifics-btn')) { 70 return false; 71 } 72 73 var hdr_sidebar_con = jQuery('.careerfy-mobile-hdr-sidebar'); 74 if (hdr_sidebar_con.hasClass('animate-menu-open')) { 75 hdr_sidebar_con.removeClass('animate-menu-open'); 76 } 77 } 78}); 79 80jQuery.careerfySidebarMenu = function (menu) { 81 var animationSpeed = 300, 82 subMenuSelector = '.sidebar-submenu'; 83 84 jQuery(menu).on('click', 'li .child-navitms-opner', function (e) { 85 var $this = jQuery(this); 86 var checkElement = $this.next(); 87 88 if (checkElement.is(subMenuSelector) && checkElement.is(':visible')) { 89 checkElement.slideUp(animationSpeed, function () { 90 checkElement.removeClass('menu-open'); 91 }); 92 checkElement.parent("li").removeClass("active"); 93 } 94 95 //If the menu is not visible 96 else if ((checkElement.is(subMenuSelector)) && (!checkElement.is(':visible'))) { 97 //Get the parent menu 98 var parent = $this.parents('ul').first(); 99 //Close all open menus within the parent 100 var ul = parent.find('ul:visible').slideUp(animationSpeed); 101 //Remove the menu-open class from the parent 102 ul.removeClass('menu-open'); 103 //Get the parent li 104 var parent_li = $this.parent("li"); 105 106 //Open the target menu and add the menu-open class 107 checkElement.slideDown(animationSpeed, function () { 108 //Add the class active to the parent li 109 checkElement.addClass('menu-open'); 110 parent.find('li.active').removeClass('active'); 111 parent_li.addClass('active'); 112 }); 113 } 114 //if this isn't a link, prevent the page from being redirected 115 if (checkElement.is(subMenuSelector)) { 116 e.preventDefault(); 117 } 118 });
119} 120 121jQuery.careerfySidebarMenu(jQuery('.careerfy-mobile-navbar')); 122 123jQuery('#careerfy-mobile-navbtn, .mobile-navclose-btn').click(function () { 124 if (!jQuery('.careerfy-mobile-hdr-sidebar').hasClass('animate-menu-open')) { 125 jQuery('.careerfy-inmobile-itemsgen').hide(); 126 jQuery('.careerfy-sidebar-navigation').removeAttr('style'); 127 } 128 jQuery('.careerfy-mobile-hdr-sidebar').toggleClass('animate-menu-open'); 129}); 130 131jQuery(document).ready(function() { 132 jQuery("body").fitVids(); 133}); 134 135jQuery(window).on("load", function () { 136 jQuery("body").addClass("active"); 137 jQuery("body").removeClass("careerfy-page-loading"); 138});
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.