1/** 2 * ç»åãªã©ã³ã³ãã³ãå ¨ä½ãèªã¿è¾¼ã¾ããã¿ã¤ãã³ã°ã§å®è¡ããã 3 */ 4$(window).on('load', function () { 5 console.log("window loaded!"); 6 7 // ãã¼ãã£ã³ã°è¦ç´ ããã§ã¼ãã¢ã¦ã 8 $('.loader').fadeOut(); 9}); 10 11 12/** 13 * HTML(DOM)ãèªã¿è¾¼ã¾ããã¿ã¤ãã³ã°ã§å®è¡ããã 14 */ 15(function () { 16 console.log("document loaded."); 17 18 /** 19 * ã¡ãã¥ã¼ãã¿ã³ã®éé 20 * #menu-btn ã¡ãã¥ã¼ãã¿ã³ 21 * #gnav ããã²ã¼ã·ã§ã³ã¡ãã¥ã¼ 22 * #bg ããã²ã¼ã·ã§ã³ã¡ãã¥ã¼ã¨ã³ã³ãã³ãã®éã«æ·ãèæ¯ 23 */ 24 25 $('#menu-btn,#bg').on('click', function (e) { 26 console.log("button clicked."); 27 // ã¤ãã³ãããã£ã³ã»ã« 28 e.preventDefault(); 29 // ã¯ã©ã¹ã®ãã°ã«å¦ç 30 $('#menu-btn').toggleClass('menu-btn--open'); 31 $('#gnav').toggleClass('gnav--open'); 32 $('.header__logo-menu').toggleClass('header__logo-menu--open'); 33 $('#bg').toggleClass('bg--open'); 34 }); 35 36 /* ã³ã³ãã¼ã¸ã§ã³ã¿ã° */ 37 38 $('a[href="tel:0333088281"]').on('click', function (e) { 39 gtag('event', 'click-satsuki', { 40 'event_category': 'tel-satsuki' 41 }); 42 }); 43 44 $('a[href="tel:0353149663"]').on('click', function (e) { 45 gtag('event', 'click-yui', { 46 'event_category': 'tel-yui' 47 }); 48 }); 49 50 $('a[href="tel:0353147081"]').on('click', function (e) { 51 gtag('event', 'click-souzo', { 52 'event_category': 'tel-souzo' 53 }); 54 }); 55 56 57 var $win = $(window); 58 var windowWidth = $win.width(); 59 $win.on('resize', function () { 60 windowWidth = $win.width(); 61 }); 62 $('.gnav-list__item--parent .gnav-list__link').on('click', function (e) { 63 if (windowWidth < 1024) { 64 e.preventDefault(); 65 $(this).toggleClass('gnav-list__link--open'); 66 } 67 }); 68 /** 69 * ãã¼ã¸å ãªã³ã¯ãã¿ã³èªåçæ 70 */ 71 var $goto_tareget = $('.post-type-page,.post-type-information,.post-type-blog'); 72 if ($goto_tareget.length && $goto_tareget.find('.goto').length && $goto_tareget.find('.h2').length) { 73 $goto_tareget.find('.h2[id]').each(function (number, element) { 74 $goto_tareget.find('.goto').append('<div class="goto__item"><a class="goto__link jumper" href="#' + $(element).attr('id') + '">' + $(element).text() + '</a></div>'); 75 }); 76 } 77 78 /** 79 * ãããã¸æ»ããã¿ã³ã®ã¯ãªãã¯ã¤ãã³ã 80 */ 81 $('#scroller').on('click', function (e) { 82 // ã¤ãã³ãããã£ã³ã»ã« 83 e.preventDefault(); 84 // ã¢ãã¡ã¼ã·ã§ã³å¦ç 85 $('html,body').animate({ 86 scrollTop: 0 // ã¹ã¯ãã¼ã«ä½ç½®ã0ã«æ»ã 87 }, 88 1000 // ã¢ãã¡ã¼ã·ã§ã³ãããæéï¼ããªç§ï¼ 89 ); 90 }); 91 92 /** 93 * ãã¼ã¸å ãªã³ã¯ã®ã¯ãªãã¯ã¤ãã³ã 94 */ 95 $(window).on('load', function () { 96 var headerHeight = 130; 97 var url = $(location).attr('href'); 98 if (url.indexOf("#") != -1) { 99 var id = url.split("#"); 100 var $target = $('#' + id[id.length - 1]); 101 if ($target.length) { 102 var pos = $target.offset().top - headerHeight; 103 $("html, body").animate({ 104 scrollTop: pos 105 }, 500); 106 } 107 } 108 $('a[href^="#"]').on('click', function (e) { 109 // ã¤ãã³ãããã£ã³ã»ã« 110 e.preventDefault(); 111 // ã¢ãã¡ã¼ã·ã§ã³å¦ç 112 $('html,body').animate({ 113 scrollTop: $($(this).attr('href')).offset().top - 130 // æå®idãæã£ãè¦ç´ ã®ã¹ã¯ãã¼ã«ä½ç½®ãåå¾ 114 }, 115 500 // ã¢ãã¡ã¼ã·ã§ã³ãããæéï¼ããªç§ï¼ 116 ); 117 }); 118 }); 119 120 121 /** 122 * ãã©ã¦ã¶ã®ã¹ã¯ãã¼ã«éããã§ãã¯ãã¦ã¯ã©ã¹ããã°ã« 123 * underscore-min.js ãå¿ é 124 * https://github.com/jashkenas/underscore 125 */ 126 // HTMLãèªã¿è¾¼ã¾ããã¿ã¤ãã³ã°ã§ãã§ãã¯ãã 127 set_fixed(); 128 // ã¹ã¯ãã¼ã«ã¤ãã³ããæ¤ç¥ãã¦ãã§ãã¯ãã 129 $(window).on('scroll', _.throttle(set_fixed, 100)); 130 131 function set_fixed() { 132 var win = $(window); 133 var scroller = $("#scroller"); 134 // ãã©ã¦ã¶ã®ã¹ã¯ãã¼ã«éã確èªãã 135 if (win.scrollTop() > 500) { 136 scroller.addClass('page-top--fixed'); 137 } else { 138 scroller.removeClass('page-top--fixed'); 139 } 140 } 141 142 /** 143 * ãã©ãã¹ã©ã¤ãã¼ 144 * slick.min.js ãå¿ é 145 * https://github.com/kenwheeler/slick/ 146 */ 147 $('.photoslider').each(function () { 148 // ã¡ã¤ã³ã¹ã©ã¤ãã¼ã®ã¯ã©ã¹å
149 $main = $(this).find('.photoslider-main'); 150 // ããã²ã¼ã·ã§ã³ã®ã¯ã©ã¹å 151 $nav = $(this).find('.photoslider-nav'); 152 $main.slick({ 153 slidesToShow: 1, 154 slidesToScroll: 1, 155 arrows: true, 156 prevArrow: '<button type="button" class="slick-prev"></button>', 157 nextArrow: '<button type="button" class="slick-next"></button>', 158 fade: true, 159 asNavFor: $nav 160 }); 161 $nav.slick({ 162 // ããã²ã¼ã·ã§ã³ãä½å表示ããã 163 slidesToShow: 4, 164 slidesToScroll: 1, 165 asNavFor: $main, 166 centerMode: false, 167 dots: false, 168 focusOnSelect: true, 169 arrows: false, 170 responsive: [ 171 { 172 breakpoint: 768, 173 settings: { 174 slidesToShow: 4 175 } 176 } 177 ] 178 }); 179 }); 180 181 /** 182 * ã¹ã¯ãã¼ã«ãããã¨ãã«ã³ã³ãã³ãã表示ãã 183 * jquery.inview.min.js ãå¿ é 184 * https://github.com/protonet/jquery.inview 185 * è¦ç´ ã« data-delay ãè¨å®ãããã¨ã§è¡¨ç¤ºã®é å»¶ãã§ãã 186 * ä¾ï¼<div class="lazy" data-delay="500"> 187 */ 188 $('.lazy').on('inview', function (event, isInView) { 189 if (isInView) { 190 $(this).delay($(this).data('delay')).queue(function () { 191 $(this).addClass('lazy--inview'); 192 }); 193 } 194 }); 195 196 /* 197 * Magnific Popup 198 */ 199 $('.gallery').each(function () { 200 $(this).magnificPopup({ 201 delegate: 'a', 202 type: 'image', 203 gallery: { 204 enabled: true, 205 }, 206 }); 207 }); 208 $('.lightbox').magnificPopup({ 209 type: 'image', 210 }); 211})(); 212 213/** 214 * Polyfill object-fit 215 * ofi.min.js ãå¿ é 216 * https://github.com/bfred-it/object-fit-images 217 */ 218objectFitImages();
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.