1/** 2 * pageScroll jQuery Plugin 3 * v1.0 4 * (c)2014 RESTEP 5 * http://restep.jp/ 6 */ 7/*********************************************************** 8$('#id').pageScroll({ 9 'duration': ã¢ãã¡ã¼ã·ã§ã³æé, 10 'easing': ã¤ã¼ã¸ã³ã°ã®ç¨®é¡, 11 'dummy_class': ããã¼ã§æ¿å ¥ããdivã®ã¯ã©ã¹å 12}); 13***********************************************************/ 14(function($) { 15 $.fn.pageScroll = function(args) { 16 var defaults = { 17 'duration': 500, 18 'easing': 'swing', 19 'dummy_class': 'pagescroll-dummy' 20 }; 21 this.settings = $.extend(defaults, args); 22 var _this = this; 23 24 // 25 // åæå 26 // 27 this.init = function() { 28 // æ»ããã¿ã³å¯¾çï¼ããã¼divã追å ï¼ 29 $('body').append($('<div>').addClass(_this.settings.dummy_class).css({ 30 width: '1px', 31 height: '1px', 32 position: 'absolute', 33 left: 0, 34 top: 0 35 })); 36 37 // ãã¦ã¹ã¯ãªãã¯æã®å¶å¾¡ 38 $('a.pagescroll[href^=#]').on('click', function() { 39 var target = $(this).attr('href'); 40 var dummy_target = target.substr(1, target.length-1) + (new Date() * 1); 41 42 // æ»ããã¿ã³å¯¾ç 43 $('.'+_this.settings.dummy_class).attr( 44 'id', dummy_target 45 ).css( 46 'top', jQuery(window).scrollTop() 47 ); 48 document.location.hash = '#' + dummy_target; 49 50 // ã¹ã¯ãã¼ã« 51 $('html, body').animate({ 52 scrollTop: $(target).offset().top 53 }, { 54 duration: _this.settings.duration, 55 easing: _this.settings.easing 56 }); 57 58 return false; 59 }); 60 }; 61 this.init(); 62 }; 63})(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.