1/* UItoTop jQuery Plugin 1.2 | Matt Varone | http://www.mattvarone.com/web-design/uitotop-jquery-plugin */ 2(function ($) { 3 $.fn.UItoTop = function (options) { 4 var defaults = { 5 text: 'To Top', 6 min: 200, 7 inDelay: 600, 8 outDelay: 400, 9 containerID: 'toTop', 10 containerHoverID: 'toTopHover', 11 scrollSpeed: 1200, 12 easingType: 'linear' 13 }, settings = $.extend(defaults, options), containerIDhash = '#' + settings.containerID, 14 containerHoverIDHash = '#' + settings.containerHoverID; 15 $('body').append('<a id="' + settings.containerID + '">' + settings.text + '</a>'); 16 $(containerIDhash).hide().on('click.UItoTop', function () { 17 $('html, body').animate({scrollTop: 0}, settings.scrollSpeed, settings.easingType); 18 $('#' + settings.containerHoverID, this).stop().animate({'opacity': 0}, settings.inDelay, settings.easingType); 19 return false; 20 }).prepend('<span id="' + settings.containerHoverID + '"></span>').hover(function () { 21 $(containerHoverIDHash, this).stop().animate({'opacity': 1}, 600, 'linear'); 22 }, function () { 23 $(containerHoverIDHash, this).stop().animate({'opacity': 0}, 700, 'linear'); 24 }); 25 $(window).scroll(function () { 26 var sd = $(window).scrollTop(); 27 if (typeof document.body.style.maxHeight === "undefined") { 28 $(containerIDhash).css({'position': 'absolute', 'top': sd + $(window).height() - 50}); 29 } 30 if (sd > settings.min) 31 $(containerIDhash).fadeIn(settings.inDelay); else 32 $(containerIDhash).fadeOut(settings.Outdelay); 33 }); 34 }; 35})(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.