1/** 2* smoothScrollEx Plugin ver1.1 3* 4* 2015 Jun Sato http://creator-index.com/ 5* 6* MIT-style license. 7* 8http://creator-index.com/2015/03/870/ 9*/ 10 11 12;(function($) { 13 $(window).load(function(){ 14 15 var options = $.extend({ 16 17 scrollSpeed: 500, //XN[·é¬³i~bj 18 easing: 'swing', //C[WOiAj[VÌ®j¦vC[WOvOC 19// adjustment: -100, //Ú®®¹ÌEBhEÊu̲®l 20 delayTime: 300 //Ò@Ôi~bj¦JÚ·éÌÝ 21 22 },options); 23 24//EBhETCYð»èðµÄAÚ®®¹ÌEBhEÊu̲®lðÏX 25 var w = $(window).width(); 26 var x = 736; 27 if (w <= x) { // X}zÌ 28 var options = $.extend({ adjustment: -60 },options); //Ú®®¹ÌEBhEÊu̲®l 29 } else { // obÌ 30 var options = $.extend({ adjustment: -150 },options); //Ú®®¹ÌEBhEÊu̲®l 31 } 32 33 34 35//XN[ª100ÉBµ½ç{^\¦----------- 36 var topBtn = $('#pagetop'); 37 topBtn.hide(); 38 //XN[ª100ÉBµ½ç{^\¦ 39 $(window).scroll(function () { 40 if ($(this).scrollTop() > 100) { 41 topBtn.fadeIn(); 42 } else { 43 topBtn.fadeOut(); 44 } 45 return false; 46 }); 47 48 49 50 51 52 53 $('[href*=#]').click(function(event){ 54 var element = $(this); 55 var elementHref = element.attr('href'); 56 57 58 if(elementHref.search(/^#.+/) === 0){ 59 60 var targetId = elementHref; 61 var targetY = $(targetId).offset().top + options.adjustment; 62 event.preventDefault(); 63 $('html,body').animate({scrollTop: targetY},options.scrollSpeed,options.easing); 64 65 }else { 66 67 var hrefSplit = elementHref.split(/#/); 68 var hrefFirst = hrefSplit[0]; 69 var hrefLast = '#' + hrefSplit[1]; 70 71 var pathname = location.pathname; 72 var pathnameSplit = pathname.split(/\//); 73 var pathnameLast = pathnameSplit[pathnameSplit.length - 1]; 74 75 var hostname = location.hostname; 76 77 function aHrefCheck(){ 78 79 var check1 = hrefFirst.match(/https?:\/\/.[^\/]+\//); 80 if(check1 === null){ 81 return true; 82 }else{ 83 var check2 = check1[0].indexOf(hostname); 84 if (check2 != -1){ 85 return true; 86 }else{ 87 return false; 88 } 89 } 90 } 91 92 function aHrefChange(){ 93 if (hrefFirst.indexOf(hostname) !== -1 || hrefFirst.indexOf(pathnameLast) === -1){ 94 hrefLast = hrefLast.replace('#','?id='); 95 elementHref = hrefFirst + hrefLast; 96 element.attr('href',elementHref); 97 }else{ 98 return; 99 } 100 } 101 102 if(aHrefCheck() === true){ 103 aHrefChange(); 104 }else{ 105 106 return; 107 } 108 } 109 }); 110 111 var url = $(location).attr('href'); 112 var stringMatch = url.indexOf('?id='); 113 114 if(stringMatch === -1){ 115 return; 116 }else { 117 var urlSplit = url.split(/\?id=/); 118 var anchorLink = '#' + urlSplit[urlSplit.length -1]; 119 var anchorLinkTop = $(anchorLink).offset().top + options.adjustment; 120 121 $('html,body').delay(options.delayTime).animate({scrollTop: anchorLinkTop},options.scrollSpeed,options.easing); 122 123 } 124 125 return this; 126 127 }); 128 129 130/* 131//--------------------NXgÝè 132var linkList = $('#yoko-menu li'); 133//XgðNbNµ½Ì 134linkList.on('click', function () { 135 //NÌclassÝèðZbg 136 linkList.removeClass('current'); 137 //NbNµ½XgÉcurrentÌclassðÇÁ 138 $(this).addClass('current'); 139}); 140*/ 141 142 143})(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.