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