1jQuery(function($) { 2 $(window).load(function(){ 3 var isTriplex = false; 4 var topTriplex = 0; 5 var footer = 200; 6 var area = []; 7 function initTriplex() { 8 if ( $(".triplex").length != 1 ) return; 9 if ( $(window).innerWidth() < 980 ) return; 10 $(".triplex").css('width', $(".triplex").width()); 11 isTriplex = true; 12 topTriplex = $(".triplex").offset().top; 13 var space = ( ( $("body").height() - topTriplex - $(window).height() - footer ) / $(".triplex > div ").length ); 14 for ( var i=0; i < $(".triplex > div ").length; i++ ) { 15 area[i] = topTriplex + space * i; 16 } 17 area[i] = $("body").height(); 18 $(".triplex").css({'top':'0'}); 19 $(".triplex > div:eq(0)").show().siblings('div').hide(); 20 } 21 function scrollTriplex() { 22 var position = $(document).scrollTop(); 23 24 if ( position >= area[0] ) { 25 $(".triplex").addClass('fixed-t').css({'position':'fixed'}); 26 } 27 else if ( $(".triplex").hasClass('fixed-t') ) { 28 $(".triplex").css({'position':'relative'}).removeClass(('fixed-t')); 29 } 30 31 for ( var i = 0; i < area.length; i++ ) { 32 if ( position >= area[i] && position < area[i+1] ) { 33 $(".triplex > div:eq(" + i + ")").fadeIn().siblings('div').hide(); 34 } 35 } 36 37 var offset = $('body').height() - position - $(window).innerHeight() - footer; 38 $(".triplex").css({'top':Math.min(0, offset)}); 39 40 } 41 initTriplex(); 42 if ( isTriplex ) { 43 $('body').scroll(function () { scrollTriplex(); }); 44 $(document).scroll(function () { scrollTriplex(); }); 45 } 46 }); 47});
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.