1(function ($) { 2 $(function () { 3 $('.main-navigation .has-mega-menu.has-stretchwidth').hover(function (e) { 4 let $body = $('body'), 5 pleft = $(this).offset().left, 6 bodyleft = $body.offset().left; 7 $('.mega-stretchwidth', this).css({ 8 left: -pleft + bodyleft, 9 width: $body.width() 10 }); 11 }); 12 13 $('.main-navigation .has-mega-menu.has-containerwidth').hover(function (e) { 14 let $parent = $(this).closest('.container , .elementor-container, .col-full, .header-container, .elementor-element[data-element_type="container"] > .e-con-inner'), 15 parentwidth = $parent.width() > 1410 ? 1410 : $parent.width(), 16 windowwidht = $(window).width(), 17 cleft = $(this).offset().left, 18 left = ((windowwidht/2) - cleft - (parentwidth/2)) > 0 ? 0 : ((windowwidht/2) - cleft - (parentwidth/2)); 19 20 $('.mega-containerwidth', this).css({ 21 left: left, 22 width: parentwidth 23 }); 24 25 }); 26 27 $('.main-navigation .has-mega-menu').has('ul.custom-subwidth').hover(function (e) { 28 let pleft = parseFloat($(this).children('a').css('padding-left')), 29 $oleft = $(this).offset().left + pleft, 30 $itemwidth = parseInt($(this).children('.custom-subwidth').css('width')), 31 $bodywidth = $('body').width(); 32 33 let $offset = $oleft + $itemwidth - $bodywidth; 34 35 if ($offset >= 0){ 36 $('.mega-menu.custom-subwidth', this).css({ 37 left: -$offset + pleft 38 }); 39 } 40 else{ 41 $('.mega-menu.custom-subwidth', this).css({ 42 left: pleft 43 }); 44 } 45 }); 46 }); 47})(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.