1var StickyElement = function(node){ 2 var doc = $(document), 3 fixed = false, 4 anchor = node.find('.sticky-anchor'), 5 content = node.find('.sticky-content'); 6 7 var onScroll = function(e){ 8 var docTop = doc.scrollTop(), 9 anchorTop = anchor.offset().top; 10 if(docTop > anchorTop){ 11 if(!fixed){ 12 anchor.height(content.outerHeight()); 13 content.addClass('fixed'); 14 fixed = true; 15 } 16 } else { 17 if(fixed){ 18 anchor.height(0); 19 content.removeClass('fixed'); 20 fixed = false; 21 } 22 } 23 }; 24 $(window).on('scroll', onScroll); 25};
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.