1/*--------| UItoTop jQuery Plugin 1.1-------------------*/ 2(function($){ 3 $.fn.UItoTop = function(options) { 4 5 var defaults = { 6 text: '', 7 min: 200, 8 inDelay:600, 9 outDelay:400, 10 containerID: 'toTop', 11 containerHoverID: 'toTopHover', 12 scrollSpeed: 1200, 13 easingType: 'linear' 14 }; 15 16 var settings = $.extend(defaults, options); 17 var containerIDhash = '#' + settings.containerID; 18 var containerHoverIDHash = '#'+settings.containerHoverID; 19 20 $('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>'); 21 $(containerIDhash).hide().click(function(){ 22 $('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType); 23 $('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType); 24 return false; 25 }) 26 .prepend('<span id="'+settings.containerHoverID+'"></span>') 27 .hover(function() { 28 $(containerHoverIDHash, this).stop().animate({ 29 'opacity': 1 30 }, 600, 'linear'); 31 }, function() { 32 $(containerHoverIDHash, this).stop().animate({ 33 'opacity': 0 34 }, 700, 'linear'); 35 }); 36 37 $(window).scroll(function() { 38 var sd = $(window).scrollTop(); 39 if(typeof document.body.style.maxHeight === "undefined") { 40 $(containerIDhash).css({ 41 'position': 'absolute', 42 'top': $(window).scrollTop() + $(window).height() - 50 43 }); 44 } 45 if ( sd > settings.min ) 46 $(containerIDhash).fadeIn(settings.inDelay); 47 else 48 $(containerIDhash).fadeOut(settings.Outdelay); 49 }); 50 51}; 52})(jQuery); 53jQuery(window).load(function() { 54 jQuery().UItoTop(); 55 }); 56 57/*--------| End UItoTop -------------------*/ 58
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.