1/*! 2 * jquery.scrollto.js 0.0.1 - https://github.com/yckart/jquery.scrollto.js 3 * Scroll smooth to any element in your DOM. 4 * 5 * Copyright (c) 2012 Yannick Albert (http://yckart.com) 6 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php). 7 * 2013/02/17 8 **/ 9(function ($) { 10 $.scrollTo = $.fn.scrollTo = function(x, y, options){ 11 if (!(this instanceof $)) return $.fn.scrollTo.apply($('html, body'), arguments); 12 13 options = $.extend({}, { 14 gap: { 15 x: 0, 16 y: 0 17 }, 18 animation: { 19 easing: 'swing', 20 duration: 600, 21 complete: $.noop, 22 step: $.noop 23 } 24 }, options); 25 26 //This way we can scroll to one element 27 y = y || x; 28 29 return this.each(function(){ 30 var elem = $(this); 31 elem.stop().animate({ 32 scrollLeft: !isNaN(Number(x)) ? x : $(x).offset().left + options.gap.x, 33 scrollTop: !isNaN(Number(y)) ? y : $(y).offset().top + options.gap.y 34 }, options.animation); 35 }); 36 }; 37})(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.