1jQuery(function() { 2 jQuery(document).ready(function(){ 3 /* 4 jQuery(".pagetop").hide(); 5 jQuery(window).on("scroll", function() { 6 if (jQuery(this).scrollTop() > 300) { 7 jQuery(".pagetop").fadeIn("fast"); 8 } else { 9 jQuery(".pagetop").fadeOut("fast"); 10 } 11 }); 12 */ 13 14 jQuery('.pagetop').click(function () { 15 jQuery('html,body').animate({ 16 scrollTop: 0 17 }, 400); 18 return false; 19 }); 20 }); 21 22 23 // TELãªã³ã¯ 24 var ua = navigator.userAgent.toLowerCase(); 25 var isMobile = /iphone/.test(ua)||/android(.+)?mobile/.test(ua); 26 if (!isMobile) { 27 jQuery('a[href^="tel:"]').on('click', function(e) { 28 e.preventDefault(); 29 }); 30 } 31 32 // GoogleMapã¹ã¯ãã¼ã¹ç¡å¹ 33 var map = jQuery('iframe[src$="embed"]'); 34 map.css('pointer-events', 'none'); 35 jQuery('.googlemap').click(function() { 36 map.css('pointer-events', 'auto'); 37 }); 38 map.mouseout(function() { 39 map.css('pointer-events', 'none'); 40 }) 41 42 43 jQuery('.tab-category li').on('click', function() { 44 jQuery('.tab-category li, .news-img').removeClass('active'); 45 jQuery(this).addClass('active'); 46 var index = jQuery('.tab-category li').index(this); 47 jQuery('.news-img').eq(index).addClass('active'); 48 }); 49 50 jQuery(document).ready(function(){ 51 // ã¯ãªãã¯ãã¦éé 52 jQuery('.op-btn').on('click', function(){ 53 jQuery(this).next('.op-cont').slideToggle('fast'); 54 jQuery(this).parent('.ch-inner').next('.op-cont').slideToggle('fast'); 55 }); 56 57 // ã¯ãªãã¯å¾ã¢ã¤ã³ã³å·®æ¿ã 58 jQuery('.op-btn').on('click', function(){ 59 jQuery(this).toggleClass('open'); 60 }); 61 62 // ã¯ãªãã¯å¾ã¹ããã¡ãã¥ã¼è¡¨ç¤º 63 jQuery('.nv-btn').on('click', function(){ 64 jQuery('.site-header').toggleClass('open-nv'); 65 }); 66 67 // ã¡ãã¥ã¼è¡¨ç¤ºãèæ¯ã¹ã¯ãã¼ã«åºå® 68 /* 69 jQuery('.nv-btn').on('click', function(){ 70 //jQuery('.site').toggleClass('open-nv'); 71 if(jQuery('.site').hasClass('open-nv')){ 72 jQuery('.site').removeClass('open-nv').css('top',0 + 'px'); 73 window.scrollTo( 0 , scrollPos );//åæå 74 } else { 75 scrollPos = jQuery(window).scrollTop();//ç¾å¨ã®ã¹ã¯ãã¼ã«ä½ç½® 76 jQuery('.site').addClass('open-nv').css('top',-scrollPos + 'px'); 77 } 78 }); 79 */ 80 }); 81 82 83 // ãã¼ãã«ï¼ã¹ããæ¨ªã¹ã¯ãã¼ã«ç¨ï¼ 84 if (window.matchMedia( '(min-width: 1200px)' ).matches) { //æ¨ªå¹ 1025px以ä¸ã®ã¨ã 85 } else { 86 jQuery('table').wrap('<div class="table-wrap"></div>'); 87 } 88 89 // ãµã¤ããã¼ã«ã¬ã³ã 90 /* 91 var url = window.location; 92 //jQuery('.side-area a[href="'+url+'"]').parent().addClass('selected'); 93 jQuery('.side-area a[href="'+url+'"]').parent().parent('li').addClass('selected'); 94 jQuery('.side-area a[href="'+url+'"]').parent('li').addClass('selected'); 95 jQuery('.side-area a[href="'+url+'"]').parents('.has-children').addClass('p-selected'); 96 //jQuery('.side-area a[href="'+url+'"]').addClass('current'); 97 */ 98 99 //ãããã¼ã«ã¬ã³ã 100 //var url = window.location; 101 //jQuery('.main-menu a[href="'+url+'"]').parent('li').addClass('current_page_item'); 102 103 // ãããããã¦ã³ã¡ãã¥ã¼ 104 /* 105 jQuery('nav > ul > li') 106 .mouseover(function(e) { 107 jQuery('.ch-list', this).stop().slideDown('fast'); 108 }) 109 .mouseout(function(e) { 110 jQuery('.ch-list', this).stop().slideUp('fast'); 111 }); 112 */ 113 114 // ã¹ã¯ãã¼ã«ã§ãããã¼ãµã¤ãºã夿´ 115 jQuery(window).scroll(function () { 116 var winTop = jQuery(window).scrollTop(); 117 var headerTop = jQuery(".site-header"); 118 119 if (window.matchMedia( '(min-width: 1025px)' ).matches) { //æ¨ªå¹ 1025px以ä¸ã®ã¨ã 120 //fixedã¯ã©ã¹ãã¤ãã¦ããªãã¨ãã ããoffset()ã§å¤ãåå¾ãã 121 if ( !headerTop.hasClass("is-fixed") ) { 122 navPos = jQuery(".site-header").offset().top; 123 } 124 125 if (navPos < winTop) { 126 headerTop.addClass("is-fixed"); 127 } else { 128 headerTop.removeClass("is-fixed"); 129 } 130 } 131 }); 132 133 /* 134 jQuery(window).scroll(function () { 135 var value = jQuery(window).scrollTop(); 136 if (window.matchMedia( '(min-width: 1025px)' ).matches) { //æ¨ªå¹ 1025px以ä¸ã®ã¨ã 137 if ( value > 150 ) { 138 jQuery('.site-header').addClass('is-fixed'); 139 } else if ( jQuery('.site-header').hasClass('is-fixed') ) { 140 jQuery('.site-header').removeClass('is-fixed'); 141 } 142 } 143 }); 144 */ 145 146 147 //anchorã®ãºã¬è§£æ¶ï¼åèï¼https://tadabi.tokyo/2021/header-fixed-anchor-scroll/ æ¨ä¸ãã
147ä¿®æ£ï¼ 148 jQuery("a").on('click', function() { //åä¸ãã¼ã¸ 149 let anchorLink = jQuery(this).attr("href"); 150 func_scroll(anchorLink); 151 }); 152 jQuery(window).on('load', function() { //å¥ãã¼ã¸ 153 let url = jQuery(location).attr('href'); 154 func_scroll(url); 155 }); 156 function func_scroll(url){ 157 // urlã«ã#ããå«ã¾ãã¦ããã° 158 if(url.indexOf("#") != -1){ 159 // headerã®é«ããåå¾ãã¦ããã«30px追å ããå¤ãheaderHeightã«ä»£å ¥ 160 const headerHeight = jQuery('.site-header').outerHeight() + 30; 161 162 // urlã#ã§åå²ãã¦é åã«æ ¼ç´ 163 const anchor = url.split("#"), 164 // åå²ããæå¾ã®æååï¼#â¯â¯ã®é¨åï¼ãtargetã«ä»£å ¥ 165 target = jQuery('#' + anchor[anchor.length - 1]), 166 // ãªã³ã¯å ã®ä½ç½®ããheaderHeightã®é«ããå¼ããå¤ãpositionã«ä»£å ¥ 167 position = Math.floor(target.offset().top) - headerHeight; 168 // positionã®ä½ç½®ã«ç§»å 169 jQuery("html, body").animate({ 170 scrollTop: position 171 }, 550); 172 } 173 } 174 175 // ã¹ã ã¼ãºã¹ã¯ãã¼ã«ï¼ã¢ã³ã«ã¼ï¼ 176 /* 177 jQuery('a[href^="#"]').on('click', function() { 178 var speed = 400; 179 var href = jQuery(this).attr("href"); 180 var target = jQuery(href == "#" || href == "" ? 'html' : href); 181 var position = target.offset().top; 182 jQuery('body,html').animate({ 183 scrollTop: position 184 }, speed, 'swing'); 185 return false; 186 }); 187 */ 188 189 // ãªãµã¤ãºå¾ã«ã¹ã¿ã¤ã«åé¤ 190 /* 191 jQuery(window).on('load resize', function() { 192 var windowWidth = window.innerWidth; 193 if (windowWidth < 960) { 194 //jQuery('.hd-link').removeAttr('style'); 195 jQuery('.op-btn').removeClass('open'); 196 jQuery('.entry-list').removeAttr('style'); 197 } 198 }); 199 */ 200 var w = jQuery(window).width(); 201 var w_resize; 202 var timer = false; 203 //Responsive(); 204 jQuery(window).on("orientationchange resize",function() { 205 if (timer !== false) { 206 clearTimeout(timer); 207 } 208 timer = setTimeout(function() { 209 w_resize = jQuery(window).width(); 210 if (w != w_resize){ 211 Responsive(); 212 w = jQuery(window).width(); 213 } 214 }, 200); 215 function Responsive () { 216 jQuery('.op-btn').removeClass('open'); 217 jQuery('.entry-list').removeAttr('style'); 218 } 219 }); 220 221 222 223 224 225}); 226 227 228 229 230 231 232 233// UserAgentã§æ¯ãåãã¦htmlã«classãæ¯ã 234// 夿° 235var agent = navigator.userAgent; // ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ã 236var htmlElement = document.documentElement; // htmlè¦ç´ 237if (navigator.platform.search("Mac") != -1) { htmlElement.className += 'pc mac'; } 238if(agent.search("Windows") != -1){ 239 htmlElement.className += 'pc win'; 240 if((agent.search("Trident") != -1) || ((agent.search("MSIE") != -1))) { 241 htmlElement.className += ' ie'; 242 if(agent.search("Trident") != -1) { htmlElement.className += ' gte_ie8'; } 243 if(agent.search("Trident") == -1) { htmlElement.className += ' lte_ie8'; } 244 if(agent.search("MSIE 7") != -1){ htmlElement.className += ' ie7'; } 245 if(agent.search("MSIE 8") != -1){ htmlElement.className += ' ie8'; } 246 if(agent.search("MSIE 9") != -1){ htmlElement.className += ' ie9'; } 247 if(agent.search("MSIE 10") != -1){ htmlElement.className += ' ie10'; } 248 if(agent.search("Trident/7") != -1){ htmlElement.className += ' ie11'; } 249 } 250} 251if((agent.search("Chrome") != -1) && (agent.search("OPR") == -1)){ htmlElement.className += ' chrome'; } 252if((agent.search("Safari") != -1) && (agent.search("Chrome") == -1) && (agent.search("OPR") == -1) && (agent.search("Presto") == -1)) { htmlElement.className += ' safari'; } 253if(agent.search("Firefox") != -1) { htmlElement.className += ' firefox'; } 254if(agent.search("iPad") != -1){ htmlElement.className += ' ipad'; } 255if(agent.search("iPhone") != -1){ htmlElement.className += ' iphone'; } 256if(agent.search("Android") != -1){ htmlElement.className += ' android'; } 257 258
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.