1jQuery(document).ready(function($) { 2 3 // Scroll (in pixels) after which the "To Top" link is shown 4 var offset = 300, 5 //Scroll (in pixels) after which the "back to top" link opacity is reduced 6 offset_opacity = 1200, 7 //Duration of the top scrolling animation (in ms) 8 scroll_top_duration = 700, 9 //Get the "To Top" link 10 $back_to_top = $('.to-top'); 11 12 //Visible or not "To Top" link 13 $(window).scroll(function(){ 14 ( $(this).scrollTop() > offset ) ? $back_to_top.addClass('top-is-visible') : $back_to_top.removeClass('top-is-visible top-fade-out'); 15 if( $(this).scrollTop() > offset_opacity ) { 16 $back_to_top.addClass('top-fade-out'); 17 } 18 }); 19 20 //Smoothy scroll to top 21 $back_to_top.on('click', function(event){ 22 event.preventDefault(); 23 $('body,html').animate({ 24 scrollTop: 0 , 25 }, scroll_top_duration 26 ); 27 }); 28 29});
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.