1/* =========================================================*/ 2// jquery.smoothscroll.js / ver.1.2 3 4// Copyright (c) 2015 CoolWebWindow 5// This code is released under the MIT License 6// https://osdn.jp/projects/opensource/wiki/licenses%2FMIT_license 7 8// Date: 2015-12-28 9// Author: CoolWebWindow 10// Mail: [email protected] 11// Web: http://www.coolwebwindow.com 12 13// Used jquery.js 14// http://jquery.com/ 15/* =========================================================*/ 16 17$(function($){ 18 $.fn.smoothscroll = function(config) { 19 // ãªãã·ã§ã³ 20 var o = $.extend({ 21 easing : 'swing', // åä½ãã¿ã¼ã³ 22 speed : 500, // ã¹ã¯ãã¼ã«ã®é度 23 margintop : 0, // ã¹ã¯ãã¼ã«ä½ç½®ã®å¤æ´ 24 headerfix : '' // åºå®ããã¦ãããããã¼ã®ã»ã¬ã¯ã¿ 25 }, config); 26 27 // #ã§å§ã¾ãã¢ã³ã«ã¼ãã¯ãªãã¯ããå ´åã«å¦ç 28 $('a[href^=#]',this).click(function() { 29 // ã¢ã³ã«ã¼ã®å¤åå¾ 30 var href= $(this).attr('href'); 31 // ç§»åå ãåå¾ 32 var target = $(href == '#' || href == '' ? 'body' : href); 33 // ç§»åå ãæ°å¤ã§åå¾ 34 if(o.headerfix != ''){ 35 var navHeight = o.headerfix.outerHeight(true); 36 var position = target.offset().top - navHeight - o.margintop; 37 } else { 38 var position = target.offset().top - o.margintop; 39 } 40 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 41 $('html,body').animate({scrollTop:position}, o.speed, o.easing); 42 return false; 43 }); 44 }; 45});
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.