1(function($) 2{ 3 $(function() 4 { 5 var $window = $(window), 6 $banner = $('.fly-banner'), 7 $footer = $($banner.data('fly-rel')), 8 top = $banner.data('fly-top'), 9 bS = 0, 10 eS = 0 11 ; 12 13 setTimeout(function() 14 { 15 bS = $banner.position()['top']; 16 eS = $footer.position()['top'] 17 - $banner.height() 18 - top 19 - 50 20 ; 21 22 }, 1000); 23 24 function fly() 25 { 26 var isPinned = $banner.is('.fly-banner-pinned'), 27 scroll = $window.scrollTop() 28 ; 29 30 function pin() 31 { 32 if(isPinned) 33 { 34 return; 35 } 36 37 $banner 38 .addClass('fly-banner-pinned') 39 .css({ 40 'top': top 41 }) 42 ; 43 } 44 45 function unpin() 46 { 47 if(!isPinned) 48 { 49 return; 50 } 51 52 $banner 53 .removeClass('fly-banner-pinned') 54 .css({ 55 'top': 'auto' 56 }) 57 ; 58 } 59 60 (function() 61 { 62 if( bS < scroll && 63 eS > scroll 64 ) 65 { 66 pin(); 67 68 return; 69 } 70 71 unpin(); 72 73 })(); 74 75 setTimeout(fly, 100); 76 } 77 78 fly(); 79 }); 80})(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.