1$(document).ready(function () { 2 $('.phones__inner').hover( 3 function(e) { 4 if (!$(this).closest('.mobileheader').length) { 5 let rect = $(this)[0].getBoundingClientRect(); 6 let $dropdown = $(this).find('.phones__dropdown'); 7 if ($dropdown.length) { 8 let dropdown_rect = $dropdown[0].getBoundingClientRect(); 9 let dropdown_top = -20; 10 let dropdown_left = -20; 11 12 if (dropdown_rect.right > document.body.clientWidth) { 13 $dropdown.css('left', (document.body.clientWidth - dropdown_rect.right + dropdown_left) + 'px'); 14 } 15 else { 16 $dropdown.css('left', dropdown_left + 'px'); 17 } 18 19 if ($(this).closest('.footer__phone').length){ 20 if ((window.scrollY + rect.y + dropdown_top + $dropdown[0].scrollHeight) <= document.body.clientHeight) { 21 $dropdown.removeClass('phones__dropdown--top'); 22 } else { 23 $dropdown.addClass('phones__dropdown--top'); 24 } 25 } 26 } 27 } 28 } 29 ); 30});
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.