1function scrollTo(selector) { 2 if (!selector || selector.length == 0) { 3 return false; 4 } 5 6 var position = selector.offset().top - $('#header').height(); 7 var limit = $(document).height() - $(window).height(); 8 9 if (position >= limit) { 10 position = limit; 11 } 12 13 $('html:not(:animated), body:not(:animated)').animate( 14 { 15 scrollTop: position 16 }, 17 { 18 duration: 300, 19 easing: 'swing', 20 step : function(now){ 21 }, 22 complete: function(){ 23 } 24 } 25 ).promise().done(function(){ 26 }); 27} 28 29$(document).ready(function(){ 30 /* 31 var splitHref = location.href.split('#'); 32 var currentHref_WOHash = splitHref[0]; 33 var links = document.links; 34 for(var i=0; i<links.length; i++){ 35 // ãã¼ã¸å ãªã³ã¯ãªãã¹ã¯ãã¼ã«ããã 36 var link = links[i]; 37 var splitLinkHref = link.href.split('#'); 38 if(currentHref_WOHash == splitLinkHref[0] && document.getElementById(splitLinkHref[1])){ 39 link.onclick = function(e){ 40 e.stopPropagation(); 41 }; 42 43 link.addEventListener('click', function(e){ 44 e.stopPropagation(); 45 }, false); 46 } 47 } 48 */ 49 50 $('.update-contents a[href^="#"]').click(function() { 51 if ($(this).hasClass('noscroll')) { 52 return false; 53 } 54 55 var href = $(this).attr('href'); 56 scrollTo($(href)); 57 return false; 58 }); 59 60}); 61 62$(window).on('load', function(){ 63 var hash = window.location.hash; 64 if ($(hash).length > 0) { 65 scrollTo($(hash)); 66 } 67});
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.