1$(function () { 2 const pcBreakPoint = 1000; 3 4 // ãã³ãã¼ã¬ã¼éé 5 $('#js-hamburger-btn').on('click', function () { 6 $('#header-menu').stop(true, true).fadeToggle(); 7 $('body').toggleClass('open'); 8 }); 9 10 $('#hamburger-close').on('click', function () { 11 $('#header-menu').stop(true, true).fadeOut(); 12 $('body').removeClass('open'); 13 }); 14 15 // ã«ãã´ãªã¡ãã¥ã¼ï¼ã¹ããã®ã¿ï¼ 16 $('#header-nav-category .has-sub-category').on('click', function (e) { 17 if ($(window).width() < pcBreakPoint) { 18 e.preventDefault(); 19 $(this).next().stop(true, true).slideToggle(); 20 $(this).toggleClass('open'); 21 } 22 }); 23 24 // ä¼å¡ã¡ãã¥ã¼ 25 $('#header-member').on('click', function () { 26 $('#header-member-list').stop(true, true).slideToggle(); 27 $(this).toggleClass('open'); 28 }); 29 30 // æ¤ç´¢ Enter ã§ãªã³ã¯ã¯ãªã㯠31 $('#header-search').on('keypress', function (e) { 32 if (e.which === 13) { 33 $('#header-search-link')[0].click(); 34 } 35 }); 36 //Enterãã¼ã§æ¤ç´¢å®è¡ 37 $('.item-search-set input[type="text"]').on('keypress', function (e) { 38 var $parent = $(this).closest('.item-search-set'); 39 if (e.keyCode == 13 && $parent.find('.button').length > 0) { 40 $parent.find('.button')[0].click(); 41 } 42 }); 43 44 // ã«ã¬ã³ãã¼ç¹å®æ¥ 45 $('.day-list').each(function () {
46 const month = $(this).data('month'); 47 const day = $(this).data('day'); 48 const color = $(this).data('color'); 49 50 $(`.makeshop-calendar${month} .day${day}`).css({ 51 backgroundColor: color, 52 color: '#fff', 53 fontWeight: 'bold' 54 }); 55 }); 56 57 // ãµã¤ãããã¨ã¡ã¤ã³é«ãèª¿æ´ 58 if ($('#side-nav').is(':visible')) { 59 const sideNavHeight = $('#side-nav').height(); 60 $('main').css('min-height', $('main').height() < sideNavHeight ? sideNavHeight : 0); 61 } else { 62 $('main').css('min-height', 0); 63 } 64 65 // ã¢ã³ã¼ãã£ãªã³å ±éå¦ç 66 function initAccordion(triggerSelector, itemSelector, opts) { 67 const options = $.extend({ onlyBelow: null }, opts); 68 $(document).on('click', triggerSelector, function (e) { 69 if (options.onlyBelow && $(window).width() >= options.onlyBelow) { 70 return; // PCå¹ ã§ã¯ãªã³ã¯ã¨ãã¦åä½ 71 } 72 e.preventDefault(); 73 const $item = $(this).closest(itemSelector); 74 const $submenu = $item.children('ul'); 75 $item.toggleClass('open'); 76 $submenu.stop(true, true).slideToggle(200); 77 }); 78 } 79 80 // --- 大ã«ãã´ãªï¼ã¿ã¤ãã« â ã«ãã´ãªï¼ --- 81 $('.header-nav-title').on('click', function (e) { 82 e.preventDefault(); 83 const $title = $(this); 84 const $category = $title.next('.header-nav-category'); 85 const willClose = $category.is(':visible'); 86 87 $title.toggleClass('open'); 88 $category.stop(true, true).slideToggle(200); 89 90 // éããã¨ãã¯ä¸ã®ãµãã¢ã³ã¼ãã£ãªã³ãå ¨é¨éãã 91 if (willClose) { 92 $category.find('.header-nav-sub-accordion-item.open') 93 .removeClass('open') 94 .children('ul').stop(true, true).slideUp(0); 95 } 96 }); 97 98 // ãµã¤ãããã®ãµãã¡ãã¥ã¼ 99 initAccordion('.side-nav-sub-ttl', '.side-nav-sub-accordion-item'); 100 101 // ãããã¼ã®ãµãã¡ãã¥ã¼ï¼ã¢ãã¤ã«ã®ã¿ééï¼ 102 initAccordion('.header-nav-sub-ttl', '.header-nav-sub-accordion-item', { onlyBelow: pcBreakPoint }); 103}); 104//.search-overlay-menu 105$(function () { 106 $('.search-overlay-menu-trigger').on('click', function () { 107 if ($('html').hasClass('open')) { 108 sideMenuMotion(); 109 } 110 $('#search-overlay-menu').fadeToggle('400'); 111 $('html').toggleClass('no-scroll'); 112 $('#search-keyword').focus(); 113 $('#search-keyword').val(""); 114 }); 115}); 116 117$(function () { 118 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ï¼åºå®100pxãªãã»ããï¼ 119 $('a[href*="#"]').on('click', function (e) { 120 const targetId = $(this).attr('href').split('#')[1]; 121 if (!targetId) return; // #ã®ã¿ã®å ´åã¯ç¡è¦ 122 123 const $target = $('#' + targetId); 124 if ($target.length) { 125 e.preventDefault(); 126 127 // åºå®ãªãã»ãã 128 const headerOffset = 100; 129 130 // ã¹ã¯ãã¼ã«ä½ç½® 131 const position = $target.offset().top - headerOffset; 132 133 $('html, body').animate({ scrollTop: position }, 500, 'swing'); 134 } 135 }); 136}); 137 138 139//æå®æ¥æããã¼è¡¨ç¤ºï¼é表示 140$(document).ready(function() { 141 $(".view_timer").each(function(index, target) { 142 var startDate = $(this).attr("data-start-date"); 143 var endDate = $(this).attr("data-end-date"); 144 var nowDate = new Date(); 145 146 if (startDate) { 147 startDate = new Date(startDate); 148 } else { 149 startDate = nowDate; 150 } 151 if (endDate) { 152 endDate = new Date(endDate); 153 } 154 155 if (startDate <= nowDate && (!endDate || nowDate <= endDate)) { 156 $(this).show(); 157 } else { 158 $(this).hide(); 159 } 160 }); 161}); 162 163 164 165 166 167 168 169 170 171 172 173 174 175$(function() { 176 var 177 $goodsImg = $('#goods-img'), 178 $favoriteBtn = $('#goods-cart-favorite'), 179 windowWidth = $(window).width(), 180 windowBreakPoint = 1000; 181 182 $(window).on('load', function() { 183 setGoodsImg(); 184 });
185 186 function setGoodsImg() { 187 if ($goodsImg.find('li').length > 1) { 188 $('#goods-thumbnail li').each(function(index, element) { 189 $(element).find('a').attr('data-slide-index', index); 190 }); 191 var goodsSlider = $goodsImg.bxSlider({ 192 pagerCustom: '#goods-thumbnail', 193 onSliderLoad: function (currentIndex) { 194 $('#goods-img-count-current').text(currentIndex + 1); 195 }, 196 onSlideBefore: function ($slideElement, oldIndex, newIndex) { 197 $('#goods-img-count-current').text(newIndex + 1); 198 } 199 }); 200 $('#goods-img-count-total').text(goodsSlider.getSlideCount()); 201 } 202 } 203 204 $('#goods-quantity-up').on('click', function() { 205 changeQuantity($('#goods-quantity-input'), 'up', $('#goods-quantity-down')); 206 }); 207 208 $('#goods-quantity-down').on('click', function() { 209 changeQuantity($('#goods-quantity-input'), 'down', $('#goods-quantity-down')); 210 }); 211 212 function changeQuantity($target, mode, $btn) { 213 var 214 oldQuantity = parseInt($target.val(), 10), 215 newQuantity = 0; 216 217 switch (mode) { 218 case 'up': 219 newQuantity = oldQuantity + 1; 220 break; 221 case 'down': 222 newQuantity = oldQuantity - 1; 223 break; 224 } 225 226 if (windowBreakPoint > windowWidth) { 227 if (newQuantity <= 1) { 228 $btn.hide(); 229 } else { 230 $btn.show(); 231 } 232 } 233 234 if (newQuantity >= 1) { 235 $target.val(newQuantity); 236 } 237 } 238 239 $favoriteBtn.find('a').on('click', function() { 240 $favoriteBtn.addClass('add-favorite'); 241 }); 242 243 $('img.option-image').on('click', function() { 244 showOptionImage($(this).attr('data-option-image')); 245 }); 246 247 // ⼠追å é¨åï¼.article ã®æ«å°¾ã¸ã¹ã¯ãã¼ã« 248 $('a[href="#article-end"]').on('click', function(e) { 249 e.preventDefault(); 250 251 var $article = $('.article'); 252 var $goodsText = $('#goods-text'); 253 var scrollTarget; 254 255 if ($article.length) { 256 // .article ã®ä¸çªä¸ã¾ã§ã¹ã¯ãã¼ã« 257 scrollTarget = $article.offset().top + $article.outerHeight(); 258 } else if ($goodsText.length) { 259 // #goods-text ã®100pxä¸ã«ä½ç½ããã£ã¦ã¹ã¯ãã¼ã« 260 scrollTarget = $goodsText.offset().top - 100; 261 } else { 262 return; // ã©ã¡ããåå¨ããªãå ´åã¯ä½ãããªã 263 } 264 265 $('html, body').animate({ 266 scrollTop: scrollTarget 267 }, 600); 268 }); 269});
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.