1//ãã¼ã¸ããã 2$(function() { 3 var pagetop = $('#page-top'); 4 var snsBtn = $('.sns-btn'); 5 // ãã¿ã³é表示 6 pagetop.hide(); 7 snsBtn.hide(); 8 9 // 100px ã¹ã¯ãã¼ã«ããããã¿ã³è¡¨ç¤º 10 $(window).scroll(function() { 11 if ($(this).scrollTop() > 100) { 12 pagetop.fadeIn(); 13 snsBtn.fadeIn(); 14 } else { 15 pagetop.fadeOut(); 16 snsBtn.fadeOut(); 17 } 18 }); 19 pagetop.click(function() { 20 $('body, html').animate({ 21 scrollTop: 0 22 }, 500); 23 return false; 24 }); 25}); 26 27//ã¢ã³ã«ã¼ã¹ã¯ãã¼ã« 28var $win = $(window); 29$win.on('load resize', function() { 30 var windowWidth = window.innerWidth; 31 32 if (windowWidth > 1000) { 33 // PCã®å¦ç 34 $(function() { 35 36 //#ã§å§ã¾ãã¢ã³ã«ã¼ãã¯ãªãã¯ããå ´åã«å¦ç 37 $('a[href^="#"]').click(function() { 38 // ã¹ã¯ãã¼ã«ã®é度 39 var speed = 500; // ããªç§ 40 // ã¢ã³ã«ã¼ã®å¤åå¾ 41 var href = $(this).attr("href"); 42 // ç§»åå ãåå¾ 43 var target = $(href == "#" || href == "" ? 'html' : href); 44 // ç§»åå ãæ°å¤ã§åå¾ 45 //ãããã¼ã®é«ã 46 var hedderHeight = 90; 47 var position = target.offset().top - hedderHeight; 48 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 49 $('body,html').animate({ 50 scrollTop: position 51 }, speed, 'swing'); 52 return false; 53 }); 54 }); 55 // å¥ãã¼ã¸ããã®ãªã³ã¯ 56 $(window).on('load', function() { 57 var headerHight = 90; //ãããã®é«ã 58 if (document.URL.match("#")) { 59 var str = location.href; 60 var cut_str = "#"; 61 var index = str.indexOf(cut_str); 62 var href = str.slice(index); 63 var target = href; 64 var position = $(target).offset().top - headerHight; 65 $("html, body").scrollTop(position); 66 return false; 67 } 68 69 }); 70 } else { 71 // SPã®å¦ç 72 $(function() { 73 74 //#ã§å§ã¾ãã¢ã³ã«ã¼ãã¯ãªãã¯ããå ´åã«å¦ç 75 $('a[href^="#"]').click(function() { 76 // ã¹ã¯ãã¼ã«ã®é度 77 var speed = 500; // ããªç§ 78 // ã¢ã³ã«ã¼ã®å¤åå¾ 79 var href = $(this).attr("href"); 80 // ç§»åå ãåå¾ 81 var target = $(href == "#" || href == "" ? 'html' : href); 82 // ç§»åå ãæ°å¤ã§åå¾ 83 //ãããã¼ã®é«ã 84 var hedderHeight = 60; 85 var position = target.offset().top - hedderHeight; 86 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 87 $('body,html').animate({ 88 scrollTop: position 89 }, speed, 'swing'); 90 return false; 91 }); 92 }); 93 // å¥ãã¼ã¸ããã®ãªã³ã¯ 94 $(window).on('load', function() { 95 var headerHight = 60; //ãããã®é«ã 96 if (document.URL.match("#")) { 97 var str = location.href; 98 var cut_str = "#"; 99 var index = str.indexOf(cut_str); 100 var href = str.slice(index); 101 var target = href; 102 var position = $(target).offset().top - headerHight; 103 $("html, body").scrollTop(position); 104 return false; 105 } 106 107 }); 108 } 109}); 110 111// Firefoxä½ç½®ããä¿®æ£ 112window.onpageshow = function() { 113 //ãã¼ã¸ã®URLããã¢ã³ã«ã¼é¨åãåå¾ 114 var myhash = $(location).attr('hash'); 115 if (myhash.length > 1) { //ã¢ã³ã«ã¼ããã£ãå ´å 116 if ($(myhash).length) { //ã¢ã³ã«ã¼ã«å¯¾å¿ããidã®è¦ç´ ããã£ãå ´å 117 var nScrolltop = $(window).scrollTop(); 118 var nOffset = $(myhash).offset().top; 119 //ç¾å¨ã®ã¹ã¯ãã¼ã«ä½ç½®ã¨ã¢ã³ã«ã¼ã«å¯¾å¿
119ããidã®Y座æ¨ï¼æ¬æ¥æãã¹ãä½ç½®ï¼ãåå¾ 120 if (Math.abs(nScrolltop - nOffset) > 5) { //2ã¤ã®ä½ç½®ã®å·®ã5以ä¸ã®å ´å 121 //æ¬æ¥æãã¹ãä½ç½®ã«èª¿æ´ 122 $(window).scrollTop(nOffset); 123 console.log("調æ´ãã¾ãã"); 124 } else { 125 console.log("調æ´ã®å¿ è¦ãªã"); 126 } 127 } else { 128 console.log("idã«å¯¾å¿ããè¦ç´ ããªã"); 129 } 130 } else { 131 console.log("ã¢ã³ã«ã¼ããªã"); 132 } 133};
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.