1/* http://blog.quusookagaku.com/wordpress/12799/ */ 2jQuery(window).on('load',function(){ 3 var contentHeight = $(document).height(); 4 var windowHeight = $(window).height(); 5 var main = $("#main_column"); 6 var mainHeight = main.outerHeight(); 7 var side = $("#sidebar_left"); 8 var sideHeight = side.outerHeight(); 9 var target = $("#Sticky-Left"); 10 var targetHeight = target.outerHeight(); 11 var header = $(".Sticky-Left-header"); 12 var headerPosition = header.position(); 13 var footer = $("#footer"); 14 var footerHeight = footer.outerHeight(); 15 $(window).scroll(function(){ 16 sideHeight = side.outerHeight(); 17 mainHeight = main.outerHeight(); 18 if(sideHeight < mainHeight) { 19 headerPosition = header.position(); 20 21 var scrollLeft = $(this).scrollLeft(); 22 var targetLeft = headerPosition.left; 23 var cssLeft; 24 if(scrollLeft > 0) { 25 cssLeft = targetLeft - scrollLeft; 26 } else { 27 cssLeft = "auto"; 28 } 29 30 var scrollTop = $(this).scrollTop(); 31 var targetTop = headerPosition.top; 32 if(scrollTop > targetTop) { 33 windowHeight = $(window).height(); 34 contentHeight = $(document).height(); 35 footerHeight = footer.outerHeight(); 36 var visibleBottom = scrollTop + windowHeight; 37 if(footerHeight > contentHeight - visibleBottom) { 38 target.css({position: "fixed", left: cssLeft, top: "auto", bottom: footerHeight - (contentHeight - visibleBottom)}); 39 } else { 40 target.css({position: "fixed", left: cssLeft, top: "50px", bottom: "auto"}); 41 } 42 } else { 43 target.css({position: "static", left: cssLeft, top: "auto", bottom: "auto"}); 44 } 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.