1// JavaScript Document 2 3// ã¹ããã®ã¨ã.telã¯ã©ã¹ããªã³ã¯ã§ã©ãã 4//========================================================================================== 5if ( navigator.userAgent.match( /(iPhone|Android|Mobile)/ ) ) { 6 jQuery( function( $ ) { 7 $( '.tel, .tel2' ).each( function() { 8 const str = $( this ).html(); 9 if ( $( this ).children().is( 'img' ) ) { 10 $( this ).html( $( '<a class="link-tel">' ).attr( 'href', 'tel:' + $( this ).children().attr( 'alt' ).replace( /-/g, '' ) ).append( str + '</a>' ) ); 11 } else { 12 $( this ).html( $( '<a class="link-tel">' ).attr( 'href', 'tel:' + $( this ).text().replace( /-/g, '' ) ).append( str + '</a>' ) ); 13 } 14 } ); 15 } ); 16} 17 18// ãã¼ã¸ãããã¸æ»ããã¿ã³ 19//========================================================================================== 20jQuery( function( $ ) { 21 //ãããã¸æ»ããã¿ã³ 22 const topBtn = $( '#page-top' ); 23 topBtn.hide(); 24 //ã¹ã¯ãã¼ã«ã200ã«éããããã¿ã³è¡¨ç¤º 25 $( window ).scroll( function() { 26 if ( $( this ).scrollTop() > 200 ) { 27 topBtn.fadeIn(); 28 } else { 29 topBtn.fadeOut(); 30 } 31 } ); 32 //ã¹ã¯ãã¼ã«ãã¦ããã 33 topBtn.click( function() { 34 $( 'body,html' ).animate( { 35 scrollTop: 0, 36 }, 500 ); 37 return false; 38 } ); 39} ); 40 41// ãããããã¦ã³ã¡ãã¥ã¼ 42//========================================================================================== 43// PC CSSã®ã¿ã§å®è£ 44// ãã ãããã¼ã¸èªã¿è¾¼ã¿æã«ä¸ç¬è¡¨ç¤ºããã¦ãã¾ããã¨ãããã®ã§CSSã§display:none;ã«ãã¦ããã®ãJSãèªã¿è¾¼ã¾ããããã§ã¼ãã¤ã³ãæå®ãã¦ããè§£é¤ãã 45// jQuery( window ).on( 'load', function() { 46// // SPãã³ãã¼ã¬ã¼å ã®.subãå«ãã§ãã¾ããªãããã«ã»ã¬ã¯ã¿ã工夫 47// jQuery( '.main-navigation .sub-menu' ).addClass( 'load' ); 48// } ); 49 50// ããã¯ã¼ã¡ãã¥ã¼ãéãã¦ããã¨ãã¯èæ¯ã®htmlè¦ç´ ãã¹ã¯ãã¼ã«ãããªãããã®ã¯ã©ã¹ãä»ä¸ 51jQuery(function ($) { 52 let st; 53 $('#js-btnHamburger').click(function () { 54 if ($(this).attr('aria-expanded') === 'false') { 55 st = $(window).scrollTop(); // ãã©ã¦ã¶å ¨ä½ã®ã¹ã¯ãã¼ã«ä½ç½®ãåå¾ 56 $('html').addClass('is-fixed').css({'top': -st}); 57 $(this).attr('aria-expanded', true); 58 $('.nav-web-reserve').hide(); 59 } else { 60 $('html').removeClass('is-fixed').css({'top': 0}); 61 $(window).scrollTop(st); 62 $(this).attr('aria-expanded', false); 63 if (window.matchMedia( '(min-width: 769px)' ).matches) { 64 $('.nav-web-reserve').show(); 65 } 66 } 67 }); 68 69 /* ãã©ã¦ã¶ããã¯ããã¨ãã«iOSã§ã¡ãã¥ã¼ãéããã¾ã¾ã«ãªãã®ã§ããã©ã¦ã¶ããã¯ããããªãã¼ãï¼ä¸»ã«iOS対çï¼ 70 â» window.onpageshow ã§ã¯2å以䏿»ã£ãã¨ãã«å¹ããªãã¨ã®ãã¨ã§ popstate ãä½¿ç¨ 71 popstateã¯ã¢ãã¬ã¹ãã¼ãå¤ããã¨çºç«ããï¼åä¸ãã¼ã¸å ã®ã¢ã³ã«ã¼ãªã³ã¯ãå¥ã¿ãã¸ã®ã¢ã³ã«ã¼ãï¼ã®ã§ãã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ã®ã¹ã¯ãªããã«aè¦ç´ ã®ããã©ã«ãåä½ï¼ã¢ãã¬ã¹ãã¼ã®ç¶æ ã夿´ï¼ãããã«çµäºãã return false; ãªã©ãã¤ãããããªãã¼ã以å¤ã®åä½ã§ãªãã¨ããã */ 72 history.replaceState(null, document.getElementsByTagName('title')[0].innerHTML, null); 73 window.addEventListener('popstate', function(e) { 74 // ãªãã¼ããããå ´å 75 // window.location.reload(); 76 77 // ãªãã¼ã以å¤ã®åä½ã§ 78 $("#js-btnHamburger").each(function(i, elem) { 79 $('html').removeClass('is-fixed').css({'top': 0}); 80 $(elem).attr('aria-expanded', false); 81 }); 82 83 }); 84}); 85 86 87// ãã§ã¼ãã¤ã³ã®æ±ç¨ããªã¬ã¼ 88//========================================================================================== 89jQuery( function( $ ) { 90 $( window ).scroll( function() { 91 const elem = $( '.js-fadeIn' ); 92 93 elem.each( function() { 94 const active = 'active'; 95 const scrollPos = $( window ).scrollTop(); 96 const elemOffset = $( this ).offset().top; 97 const wh = $( window ).height(); 98 99 if ( scrollPos > elemOffset - wh + ( wh / 7 ) ) {
100 // ç»é¢ã®ä¸ãã1/7ã®ä½ç½®ã¾ã§ãããçºå 101 $( this ).addClass( active ); 102 } 103 } ); 104 } ); 105 $( window ).scroll(); // ãã¡ã¼ã¹ããã¥ã¼ã«è©²å½è¦ç´ ãå ¥ã£ã¦ããå ´åã«å³æã«å¼ã³åºã 106} ); 107 108 109// ã¿ãåãæ¿ã 110//========================================================================================== 111jQuery(function ($) { 112 const tab = $('.js-tab-list [role="tab"]'), 113 tabpanel = $('[role="tabpanel"]'); 114 115 tab.stop().on("click", function () { 116 const id = $(this).attr('href'); // idãåå¾ 117 $(".js-tab-body").find("*").removeClass("active"); // ã¿ãã³ã³ãã³ãå ã®ã¹ã¯ãã¼ã«ãã§ã¼ãã¤ã³ç¨ 118 119 // ã¿ããã¿ã³ã®ç¶æ 夿´ 120 tab.attr('aria-selected', false); 121 $(this).attr('aria-selected', true); 122 123 // ã¿ãã³ã³ãã³ãã®ç¶æ 夿´ 124 tabpanel.attr('aria-hidden', true); 125 $(id).attr('aria-hidden', false); 126 127 // ã¿ãã表示ãããå¾ã« slick ãåè¨ç®ï¼éè¦ï¼ï¼ 128 setTimeout(function () { 129 $(id).find('.thumb_slider, .thumb').slick('setPosition'); 130 }, 100); 131 132 // ã¿ãã³ã³ãã³ãå ã®ã¹ã¯ãã¼ã«ãã§ã¼ãã¤ã³ç¨ 133 $(window).scroll(); 134 135 return false; 136 }); 137}); 138 139 140 141// ã¢ã³ã«ã¼ä»ãã§å¥ãã¼ã¸ããã¿ãããããã¼ã¸ã«é·ç§»ãã¦ããå ´åã«ãã¿ãã®å¦çããã¦ã¹ã¯ãã¼ã« 142//========================================================================================== 143jQuery(function($){ 144 const hash = location.hash; 145 // hashã«å¤ãããã° 146 if (hash !== '') { 147 // ãã¤ã¬ã¯ãã«ããã·ã¥ã®ä½ç½®ã«è¡ããªãããã䏿¦ãããã«ããã ããå¦çã追ãã¤ããªãã¦ä¸ç¬ããã·ã¥ä½ç½®ã表示ãããå ´åãå¤ã 148 $('body,html').stop().scrollTop(0); // Chromeã§ã¿ãããã«å ã«ã¢ã³ã«ã¼å ãããã¨ãã«å¹ããªããã¨ããã 149 150 // 䏿¦å ¨é¨ã®ã¿ãã³ã³ãã³ããé表示ã«ãå ¨é¨ã®ã¿ããã¿ã³ãéé¸æç¶æ ã« 151 $('[role=\"tabpanel\"]').attr('aria-hidden', true); 152 $('.js-tab-list [role=\"tab\"]').attr('aria-selected', false); 153 154 // hashãã¿ããã¿ã³ã ã£ãå ´å 155 if ($(hash).is('[role=tab]')) { 156 // hashãæã¤ã¿ãã³ã³ãã³ãã表示 157 const id = hash.slice(1); // #ãåé¤ 158 $('[aria-labelledby=\"' + id + '\"]').attr('aria-hidden', false); 159 160 // 該å½ã®ã¿ããã¿ã³ãé¸æç¶æ ã« 161 $(hash).attr('aria-selected', true); 162 } else { 163 const has = $('.tab-panel').has(hash); // hashãæã¤ã¿ãã³ã³ãã³ãè¦ç´ ãåå¾ 164 165 // hashãæã¤ã¿ãã³ã³ãã³ãã表示 166 has.attr('aria-hidden', false); 167 168 // 該å½ã®ã¿ããã¿ã³ãé¸æç¶æ ã« 169 const id = has.attr('id'); // idãåå¾ 170 $('[aria-controls=\"' + id + '\"]').attr('aria-selected', true); 171 } 172 173 // hashã®ä½ç½®ã«ã¹ã¯ãã¼ã« 174 setTimeout(function () { 175 const mq = window.matchMedia('(max-width:767px)'); 176 // PCã®åºå®ãããã¼é«ãpx 177 let headerHeight = 0; 178 // SPã ãåºå®ãããã¼ 179 if (mq.matches) { 180 // ãããã¼ã®é«ããpxã§åå¾ 181 headerHeight = $('#masthead').outerHeight(); 182 } 183 const tt = $(hash).offset().top; 184 $('html,body').stop().animate({ scrollTop: tt - headerHeight - 10 }, 500, 'swing'); 185 }, 300); 186 } 187}); 188 189 190// ãã¼ã¸å ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 191//========================================================================================== 192jQuery( function( $ ) { 193 $( 'a[href^="#"]' ).not('[role=tab]').click( function() { 194 195 // remåä½ãpxåä½ã«å¤æãã 196 // function convertRemToPx(rem) { 197 // const fontSize = getComputedStyle(document.documentElement).fontSize; 198 // return rem * parseFloat(fontSize); 199 // } 200 // const headerHeight = convertRemToPx(5.2); 201 // console.log(headerHeight); 202 203 const href = $( this ).attr( 'href' ); 204 const target = $( href ); 205 var datacheck = $(this).data('check'); 206 207 // ã¢ã³ã«ã¼å ãã¿ããã¿ã³ã ã£ãå ´å 208 if (target.is('[role=tab]')) { 209 // ã¿ããã¿ã³ã®ç¶æ 夿´ 210 $('.js-tab-list [role="tab"]').attr('aria-selected', false); 211 target.attr('aria-selected', true);
212 // ã¿ãã³ã³ãã³ãã®ç¶æ 夿´ 213 const id = href.slice(1); // #ãåé¤ 214 $('[role="tabpanel"]').attr('aria-hidden', true); 215 $('[aria-labelledby="' + id + '"]').attr('aria-hidden', false); 216 } 217 218 // ã¢ã³ã«ã¼å ã®è¦ªè¦ç´ ãã¿ããã¿ã³ã ã£ãå ´å 219 if (datacheck == 'moveless') { 220 const tabname = $(this).data('tab'); 221 $('[role=\"tabpanel\"]').attr('aria-hidden', true); 222 $('.js-tab-list [role=\"tab\"]').attr('aria-selected', false); 223 $('[aria-labelledby=\"' + tabname + '\"]').attr('aria-hidden', false); 224 $('#'+tabname).attr('aria-selected', true); 225 } 226 227 const mq = window.matchMedia('(max-width:767px)'); 228 // PCã®åºå®ãããã¼é«ãpx 229 let headerHeight = 0; 230 // SPã®åºå®ãããã¼é«ã 231 if (mq.matches) { 232 // ãããã¼ã®é«ããpxã§åå¾ 233 headerHeight = $('#masthead').outerHeight(); 234 } 235 236 const tt = target.offset().top; 237 $( 'body,html' ).stop().animate( { scrollTop: tt - headerHeight - 10 }, 500, 'swing' ); 238 return false; // ãã©ã¦ã¶ããã¯å¯¾çç¨ã®popstateãã¢ã³ã«ã¼ã§ã¢ãã¬ã¹ãã¼ãå¤ããã¨çºç«ãã¦ãªãã¼ããã¦ãã¾ãã®ã§ãaè¦ç´ ã®ããã©ã«ãåä½ã鲿¢ããï¼ã¢ãã¬ã¹ãã¼ã«ã¢ã³ã«ã¼ãä»ä¸ããªãã§çµäºããï¼ 239 240 } ); 241} ); 242 243 244// FAQ/ãåãåãããã¼ã¸ ãããã質åããã©ã¤ãã·ã¼ããªã·ã¼ ã¢ã³ã¼ãã£ãªã³ 245//========================================================================================== 246jQuery( function( $ ) { 247 const tab = $(".js-accordion-tab"), 248 panel = $(".js-accordion-panel"); 249 250 // åæè¨å® 251 tab.attr({ 252 'aria-selected': false, 253 'aria-expanded': false 254 }); 255 panel.hide().attr('aria-hidden', true); 256 257 // ã¿ã¤ãã«ã¯ãªãã¯ã§éé 258 tab.on('click', function () { 259 // ã¯ãªãã¯ããè¦ç´ ã®æ¬¡ã®è¦ç´ ãè¡¨ç¤ºç¶æ ã ã£ãå ´å 260 if ($(this).next().is(':visible')) { 261 // éãã 262 $(this).attr({ 263 'aria-selected': false, 264 'aria-expanded': false 265 }); 266 $(this).next().attr('aria-hidden', true); 267 $(this).removeClass('open').next().slideUp(350, 'swing'); 268 } else { 269 // è¡¨ç¤ºç¶æ ã§ã¯ãªãã£ãå ´åã¯éã 270 $(this).attr({ 271 'aria-selected': true, 272 'aria-expanded': true 273 }); 274 $(this).next().attr('aria-hidden', false); 275 $(this).addClass('open').next().slideDown(350, 'swing'); 276 } 277 }); 278}); 279 280 281// å½é¢ã«ã¤ãã¦ãã¼ã¸ ã¡ãã£ã¢æ å ±ã®Masonry 282//========================================================================================== 283// DOMã®å¤åãèµ·ãã£ãæã®å¦ç 284var observer = new MutationObserver(function(){ 285 const $grid = jQuery('.grid').imagesLoaded(function(){ 286 $grid.masonry({ 287 itemSelector: '.grid-item', 288 columnWidth: '.grid-sizer', 289 percentPosition: true 290 }); 291 }); 292}); 293// ç£è¦å¯¾è±¡ã®è¦ç´ ãªãã¸ã§ã¯ã 294const elem = document.getElementById('media-tab'); 295// ç£è¦æã®ãªãã·ã§ã³ï¼å±æ§å¤ï¼ 296const config = { 297 attributes: true 298}; 299 300// ç£è¦å¯¾è±¡ã®è¦ç´ ãåå¨ããã°å¤åç£è¦ãã¹ã¿ã¼ã 301if(elem){ 302 observer.observe(elem, config); 303} 304 305// jQuery(function ($) { 306// // ãã¼ã¸ãã¼ãæã«ã¢ã¯ãã£ãã§ã¯ãªãã¿ãã«ããã¨ã¬ã¤ã¢ã¦ããå´©ããã®ã§ã¿ãã¯ãªãã¯ã®ã¿ã¤ãã³ã°ã§çºç« 307// $('#media-tab').stop().on('click', function () { 308// const $grid = $('.grid').imagesLoaded(function(){ 309// $grid.masonry({ 310// itemSelector: '.grid-item' 311// }); 312// }); 313// }); 314// }); 315 316 317 318 319 320jQuery( function( $ ) { 321 322 // ã.modal_openããã¯ãªãã¯ãããã¢ã¼ãã«ã¨é»ãèæ¯ã表示ãã 323 $('.modal_open').click(function(){ 324 325 // é»ãèæ¯ãbodyå ã«è¿½å 326 $('body').append('<div class="modal_bg"></div>'); 327 $('.modal_bg').fadeIn(); 328 329 // data-targetã®å 容ãIDã«ãã¦modalã«ä»£å ¥ 330 var modal = '#' + $(this).attr('data-target'); 331 332 // ã¢ã¼ãã«ãã¦ã£ã³ãã¦ã®ä¸å¤®ã«é ç½®ãã 333 function modalResize(){ 334 var w = $(window).width(); 335 var h = $(window).height(); 336 337 var x = (w - $(modal).outerWidth(true)) / 2; 338 var y = (h - $(modal).outerHeight(true)) / 2; 339 340 // ä¸ããã®ä½ç½®ãåºå®ãã 341 var fixedTopPosition = 50; 342 $(modal).css({ 'left': x + 'px', 'top': fixedTopPosition + 'px' }); 343 } 344 345 // modalResizeãå®è¡ 346 modalResize(); 347
348 // modalããã§ã¼ãã¤ã³ã§è¡¨ç¤º 349 $(modal).fadeIn(); 350 351 // .modal_bgã.modal_closeãã¯ãªãã¯ãããã¢ã¼ãã«ã¨èæ¯ããã§ã¼ãã¢ã¦ãããã 352 $('.modal_bg, .modal_close').off().click(function(){ 353 $('.modal_box').fadeOut(); 354 $('.modal_bg').fadeOut('slow',function(){ 355 $('.modal_bg').remove(); 356 }); 357 }); 358 359 // ã¦ã£ã³ãã¦ããªãµã¤ãºããããã¢ã¼ãã«ã®ä½ç½®ãåè¨ç®ãã 360 $(window).on('resize', function(){ 361 modalResize(); 362 }); 363 364 // .modal_switchãæ¼ãã¨ã¢ã¼ãã«ãåãæ¿ãã 365 $('.modal_switch').click(function(){ 366 367 // æ¼ããã.modal_switchã®è¦ªè¦ç´ ã®.modal_boxããã§ã¼ãã¢ã¦ãããã 368 $(this).parents('.modal_box').fadeOut(); 369 370 // æ¼ããã.modal_switchã®data-targetã®å 容ãIDã«ãã¦modalã«ä»£å ¥ 371 var modal = '#' + $(this).attr('data-target'); 372 373 // ã¢ã¼ãã«ãã¦ã£ã³ãã¦ã®ä¸å¤®ã«é ç½®ãã 374 function modalResize(){ 375 var w = $(window).width(); 376 var h = $(window).height(); 377 378 var x = (w - $(modal).outerWidth(true)) / 2; 379 var y = (h - $(modal).outerHeight(true)) / 2; 380 381 // ä¸ããã®ä½ç½®ãåºå®ãã 382 var fixedTopPosition = 50; 383 $(modal).css({ 'left': x + 'px', 'top': fixedTopPosition + 'px' }); 384 //$(modal).css({'left': x + 'px','top': y + 'px'}); 385 } 386 387 // modalResizeãå®è¡ 388 modalResize(); 389 390 $(modal).fadeIn(); 391 392 // ã¦ã£ã³ãã¦ããªãµã¤ãºããããã¢ã¼ãã«ã®ä½ç½®ãåè¨ç®ãã 393 $(window).on('resize', function(){ 394 modalResize(); 395 }); 396 }); 397 }); 398 399 400$('.thumb_slider').slick({ 401 dots: true, 402 arrows: true, 403 asNavFor: '.thumb', 404 lazyLoad: 'ondemand', // ââ ããã追å ï¼ 405 infinite: true, 406 speed: 500, 407 fade: false 408}); 409 410$('.thumb').slick({ 411 asNavFor: '.thumb_slider', 412 focusOnSelect: true, 413 slidesToShow: 4, 414 slidesToScroll: 1, 415 arrows: false, 416 lazyLoad: 'ondemand' // ââ ããã追å ï¼ 417}); 418 419}); 420 421// Placement History about-en.php 422jQuery(function ($) { 423 424 $('.js-student-history').hide(); 425 426 $('.js-toggle-history').on('click', function (e) { 427 e.preventDefault(); 428 429 $('.js-student-history').slideToggle(); 430 431 }); 432 433});
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.