1jQuery(document).ready(function($) { 2 3 function idLikeToMenuScroll() { 4 5 $('#et-secondary-menu #et-secondary-nav .id-like-to .sub-menu').css('height','auto'); 6 var menuHeight = parseInt($('#et-secondary-menu #et-secondary-nav .id-like-to .sub-menu').height(),10); 7 var paddingTop = parseInt($('#et-secondary-menu #et-secondary-nav .id-like-to .sub-menu').css('padding-top'),10); 8 var paddingBottom = parseInt($('#et-secondary-menu #et-secondary-nav .id-like-to .sub-menu').css('padding-bottom'),10); 9 10 var totalHeight = menuHeight + paddingTop + paddingBottom; 11 12 var windowHeight = parseInt($(window).height(),10); 13 14 console.log('Window Height: ' + windowHeight); 15 console.log('Total Height: ' + totalHeight); 16 17 if(windowHeight < (totalHeight + 45)) //33 is the height of the secondary menu bar plus 10px padding 18 { 19 //console.log('have to scroll: ' + ( windowHeight - 50 - paddingTop - paddingBottom)); 20 var newHeight = windowHeight - 25 - paddingTop - paddingBottom; 21 $('#et-secondary-menu #et-secondary-nav .id-like-to .sub-menu').css('height',newHeight); 22 $('#et-secondary-menu #et-secondary-nav .id-like-to .sub-menu').css('overflow','scroll'); 23 } 24 25 } 26 27 idLikeToMenuScroll(); 28 29 30 $(window).resize(function() { 31 idLikeToMenuScroll(); 32 }); 33 34 35});
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.