1 2(function($){ 3 4 5function articleHeader() { 6 var scrolltop = $(window).scrollTop(); 7 if (scrolltop > $(".article-head").offset().top) { 8 $("body").addClass("fix-article-hd"); 9 } 10 else { 11 $("body").removeClass("fix-article-hd"); 12 } 13} 14 15// fixed image on scroll 16 function fixedImage() { 17 var scrolltop = $(window).scrollTop(); 18 $('.article-wrapper').each(function() { 19 if (scrolltop >= $(this).offset().top - 120 && scrolltop <= ($(this).offset().top + $(this).outerHeight() - $(this).find('.fixed-sec').outerHeight() - 120)) 20 { 21 $(this).find('.fixed-sec').addClass('fix'); 22 } 23 else { 24 $(this).find('.fixed-sec').removeClass('fix'); 25 } 26 if (scrolltop > ($(this).offset().top + $(this).outerHeight() - $(this).find('.fixed-sec').outerHeight() - 120)) { 27 $(this).find('.fixed-sec').addClass('bottom'); 28 } 29 else { 30 $(this).find('.fixed-sec').removeClass('bottom'); 31 } 32 }); 33 } 34 35 $(window).scroll(function() { 36 if($(".path-story").length==0){ 37 if($(".article-wrapper").length > 0){ 38 articleHeader(); 39 fixedImage(); 40 } 41 } 42 }); 43 44 $(document).ready(function(){ 45 // new cbpScroller($(".article-wrapper") ); 46 if($(".path-story").length==0){ 47 new cbpScroller($(".article-wrapper"),{viewportFactor :0.3} ); 48 49 new cbpScroller($(".article-title"),{viewportFactor :0.3} ); 50 51 new cbpScroller($(".sect-in .article-head"),{viewportFactor :0.3} ); 52 } 53 54 }); 55 56 57})(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.