1var pearl_stretch_megamenu_child; 2 3(function ($) { 4 "use strict"; 5 6 $(document).ready(function () { 7 pearl_stretch_megamenu_child(); 8 }); 9 10 $(window).on('load',function(){ 11 pearl_stretch_megamenu_child(); 12 }); 13 14 $(window).on('resize',function(){ 15 pearl_stretch_megamenu_child(); 16 }); 17 18 pearl_stretch_megamenu_child = function() { 19 // Wide 20 var $wide = $('.stm_megamenu__wide > ul.sub-menu'); 21 var windowW = $(document).width(); 22 23 if ($wide.length) { 24 var $containerWide = $wide.closest('.stm-header__row'); 25 var containerWideW = $containerWide.width(); 26 27 // +15 due to global style left 15px 28 var xPos = ((windowW - containerWideW) / 2 ) + 15; 29 30 $wide.each(function () { 31 32 $(this).css({ 33 width: windowW + 'px', 34 'margin-left': '-' + xPos + 'px' 35 }) 36 }) 37 } 38 39 // Boxed 40 var $boxed = $('.stm_megamenu__boxed > ul.sub-menu'); 41 if ($boxed.length) { 42 var $container = $boxed.closest('.stm-header__row'); 43 var containerW = $container.width(); 44 45 46 $boxed.each(function () { 47 $(this).css({ 48 width: containerW + 'px', 49 }) 50 }) 51 } 52 53 54 /*GET BG*/ 55 var $mega_menu = $('.stm_megamenu'); 56 $mega_menu.each(function(){ 57 var bg = $(this).find('a[data-megabg]').attr('data-megabg'); 58 if(typeof bg !== 'undefined') { 59 $(this).find(' > ul.sub-menu').css({ 60 'background-image' : 'url("' + bg + '")' 61 }) 62 } 63 }) 64 } 65 66})(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.