1const isMobile_arkin = () => { 2 return (window.innerWidth <= 900) 3} 4 5 6$(document).ready(function () { 7 let click_hi = false; 8 //Close mobile menú click out 9 10 //Menu hi 11 let hover_hi = false; 12 $('.simple-menu').hover(function () { 13 $(`.submenu-hi-user`).addClass('hide-sub'); 14 setTimeout(() => { 15 $(`.submenu-hi-user`).attr('style', ''); 16 }, 150); 17 }, function () { 18 // out 19 } 20 ); 21 $('.menu-hi-user > a').hover(function () { 22 hover_hi = true; 23 const id = $(this).parent().attr('id'); 24 $(`#${id} div.content-submenu-hi > .submenu-hi-user`).css('display', 'block'); 25 $(`#${id} div.content-submenu-hi > .submenu-hi-user`).removeClass('animate__fadeOutUp'); 26 $(`#${id} div.content-submenu-hi > .submenu-hi-user`).removeClass('hide-sub'); 27 $(`#${id} div.content-submenu-hi > .submenu-hi-user`).addClass('animate__fadeInDown'); 28 }, function () { 29 const id = $(this).parent().attr('id'); 30 31 $(`#${id} div.content-submenu-hi > .submenu-hi-user`).removeClass('animate__fadeInDown'); 32 $(`#${id} div.content-submenu-hi > .submenu-hi-user`).addClass('animate__fadeOutUp'); 33 34 } 35 ); 36 37 $('.submenu-hi-user').hover(function () { 38 if (hover_hi == true) { 39 // over 40 $(this).css('display', 'block'); 41 $(this).removeClass('animate__fadeOutUp'); 42 $(this).addClass('animate__fadeInDown'); 43 } 44 }, function () { 45 $(this).removeClass('animate__fadeInDown'); 46 $(this).addClass('animate__fadeOutUp'); 47 48 hover_hi = false; 49 } 50 ); 51 52 53 54 55 $('#hi_btn').click(() => { 56 click_hi = !click_hi; 57 58 if (click_hi) { 59 $('.content-mob-menu').addClass('active'); 60 $('.mobile-menu-hi').css('display', 'block'); 61 $('.mobile-menu-hi').removeClass('animate__fadeOutRight'); 62 $('.mobile-menu-hi').addClass('animate__fadeInRight'); 63 } else { 64 $('.content-mob-menu').removeClass('active'); 65 $('.mobile-menu-hi').addClass('animate__fadeOutRight'); 66 $('.mobile-menu-hi').removeClass('animate__fadeInRight'); 67 close_mobile_menu('.mobile-menu-hi'); 68 } 69 }); 70 71 72 73 74 75 76 const add_arrows_menu = (id) => { 77 $(`nav#${id} ul.menu li.menu-item-has-children`).each(function (index) { 78 if (!$(this).attr('id')) { 79 $(this).attr('id', 'menu-item-' + index); 80 } 81 const element_id = id + '_' + $(this).attr('id'); 82 $(this).attr('id', element_id); 83 $(` 84 <div class="frame_ddicon"> 85 <span class="dropdown-icon left"></span> 86 <span class="dropdown-icon right"></span> 87 </div> 88 `).insertBefore(`#${element_id} ul.sub-menu`); 89 90 if (!isMobile_arkin()) { 91 $(this).mouseenter(function () { 92 show_submenu(element_id); 93 }) 94 $(this).mouseleave(function () { 95 hide_submenu(element_id); 96 }); 97 } 98 99 }); 100 } 101 102 /** Arrows submenus */ 103 add_arrows_menu('mobile_menu'); 104 105 $('.toggle ul.menu li.menu-item-has-children > .frame_ddicon').click(function (event) { 106 // event.preventDefault(); 107 console.log($(this).parent()) 108 const parent = $(this).parent(); 109 const element_id = $(parent).attr('id'); 110 // if ($(this).hasClass('active')) { 111 // const url_red = $(`#${element_id} > a`).attr('href'); 112 // //window.location.href = url_red; 113 // } 114 sh_mSubmenu(element_id); 115 }); 116 $('.toggle ul.menu li.menu-item-has-children > a').click(function (event) { 117 window.location.href = $(this).attr('href'); 118 }); 119 $('.toggle ul.menu li.menu-item-has-children .sub-menu .menu-item a').click(function () { 120 const url_red = $(this).attr('href'); 121 window.location.href = url_red; 122 });
123 let click_burger = false; 124 $('.mobile-menu-trigger').click(() => { 125 click_burger = !click_burger; 126 127 if (click_burger) { 128 $('html').addClass('wo-scroll'); 129 $('body').addClass('wo-scroll'); 130 $('.mobile-menu-container').addClass('menu-open'); 131 } else { 132 133 close_mobile_menu('.mobile-menu-container'); 134 } 135 }); 136 137 $('.mobile-menu-close').click(() => { 138 click_burger = !click_burger; 139 close_mobile_menu('.mobile-menu-container'); 140 }); 141 142 const show_submenu = (id) => { 143 $(`#${id} ul.sub-menu`).css('display', 'block'); 144 $(`#${id} ul.sub-menu`).removeClass('animate__fadeOutUp'); 145 $(`#${id} ul.sub-menu`).addClass('animate__animated animate__fadeInDown animate__delay-0.5s'); 146 147 setTimeout(() => { 148 if (!($(`#${id} ul.sub-menu`).is(':visible'))) { 149 $(`#${id} ul.sub-menu`).css('display', 'block'); 150 } 151 }, 300); 152 } 153 const hide_submenu = (id) => { 154 $(`#${id} ul.sub-menu`).removeClass('animate__fadeInDown'); 155 $(`#${id} ul.sub-menu`).addClass('animate__animated animate__fadeOutUp animate__delay-0.5s'); 156 setTimeout(() => { 157 $(`#${id} ul.sub-menu`).css('display', 'none'); 158 }, 300); 159 } 160 const sh_mSubmenu = (id) => { 161 if ($(`.toggle #${id} ul.sub-menu`).hasClass("animate__fadeInDown")) { 162 $(`#${id} .frame_ddicon .dropdown-icon`).removeClass('active'); 163 $(`#${id} .frame_ddicon .dropdown-icon`).addClass('normal'); 164 165 setTimeout(() => { 166 $(`#${id}`).removeClass('active'); 167 }, 300); 168 hide_submenu(id); 169 } else { 170 $(`#${id}`).addClass('active'); 171 $(`#${id} .frame_ddicon .dropdown-icon`).addClass('active'); 172 $(`#${id} .frame_ddicon .dropdown-icon`).removeClass('normal'); 173 174 show_submenu(id); 175 } 176 } 177 178 179 const close_mobile_menu = (class_menu) => { 180 $('html').removeClass('wo-scroll'); 181 $('body').removeClass('wo-scroll'); 182 if (class_menu === '.mobile-menu-hi') { 183 $('.mobile-menu-hi').addClass('animate__fadeOutRight'); 184 $('.mobile-menu-hi').removeClass('animate__fadeInRight'); 185 } 186 else $(class_menu).removeClass('menu-open'); 187 } 188 189 190}); 191 192$(window).on('load', function () { 193 $('.content-mob-menu').click(() => { 194 $('#hi_btn').click(); 195 $('.content-mob-menu').removeClass('active'); 196 }) 197});
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.