1$(function uil_init_custom_header() { 2 3 $('.uil-custom-header_is-debug_true').each(function () { 4 5 var $header = $(this), 6 $debug = $header.find('.uil-custom-header__debug'), 7 $info = $debug.find('.uil-custom-header__debug__info'); 8 9 $header 10 .on('mouseenter', '.uil-custom-header__item', function () { 11 var $item = $(this), 12 $parent = $item.offsetParent(), 13 position_corner = $item.attr('data-position-corner'), 14 width = $item.width(), 15 height = $item.height(), 16 offset = $item.offset(), 17 position = $item.position(); 18 19 var info_x = position.left, 20 info_y = position.top; 21 if (position_corner === 'top-right') { 22 info_x = $parent.width() - position.left - width; 23 } else if (position_corner === 'bottom-right') { 24 info_x = $parent.width() - position.left - width; 25 info_y = $parent.height() - position.top - height; 26 } else if (position_corner === 'bottom-left') { 27 info_y = $parent.height() - position.top - height; 28 } 29 30 $info.html( 31 'X=' + parseInt(info_x) + ' ' + 32 'Y=' + parseInt(info_y) + '<br>' + 33 'W=' + width + ' ' + 34 'H=' + height 35 ); 36 37 $debug.css({ 38 'display': 'block', 39 'top': offset.top, 40 'left': offset.left, 41 'width': width - 2, 42 'height': height - 2 43 }); 44 }) 45 .on('mouseleave', '.uil-custom-header__item', function () { 46 // var $item = $(this); 47 $debug.css('display', ''); 48 }); 49 50 }); 51 52});
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.