1var ecblib = ecblib || {}; 2ecblib.customize = ecblib.customize || {}; 3ecblib.customize.user = ecblib.customize.user || {}; 4 5jQuery(function () { 6 var _user = ecblib.customize.user; 7 8 //-- ããããã¼ã¸ã¸æ»ãåæå¤ 9 if (jQuery('#footer_pagetop').length > 0) { 10 jQuery('#footer_pagetop').hide(); 11 jQuery('#footer_pagetop a').attr("href", "#"); 12 if (jQuery('#searchGoodsPc').length > 0) { 13 jQuery('#footer_pagetop').append('<a href="#"></a>'); 14 } 15 } 16 17 //--- ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 18 jQuery('a[href^="#"]').click(function () { 19 const headerH = jQuery('#header').outerHeight(); 20 let speed = 500; 21 let href = jQuery(this).attr("href"); 22 let target = jQuery(href == "#" || href == "" ? 'html' : href); 23 let position = target.offset().top - headerH; 24 jQuery('body,html').animate({ scrollTop: position }, speed, 'swing'); 25 return false; 26 }); 27 28 //--- å¥ãã¼ã¸ããã®ã¢ã³ã«ã¼ãªã³ã¯ 29 if (location.hash) { 30 const target = jQuery(location.hash); 31 if (target.length) { 32 const headerH = jQuery('#header').outerHeight(); 33 setTimeout(function () { 34 const position = target.offset().top - headerH; 35 jQuery('body, html').animate({ scrollTop: position }, 500, 'swing'); 36 }, 100); 37 } 38 } 39 40 // ã¢ã³ã¼ãã£ãªã³ 41 jQuery(document).on('click', '.js-accordion', function () { 42 jQuery(this).toggleClass('active'); 43 jQuery(this).next().slideToggle(); 44 }); 45 46 // ã¿ãåãæ¿ã 47 jQuery(document).on('click', '.js-event-tab li', function () { 48 const index = jQuery(this).parent('.js-event-tab').find('li').index(this); 49 const frame = jQuery(this).parent('.js-event-tab').next('.block-top-event--container').find('.block-top-event--frame'); 50 jQuery(this).addClass('active').siblings('li').removeClass('active'); 51 frame.removeClass('active'); 52 frame.eq(index).addClass('active'); 53 }); 54 55 // header 56 if (jQuery('#header').length > 0) { 57 const header = jQuery('#header'); 58 const headerMain = jQuery('.header-main'); 59 let headerMainOffsetTop = headerMain.offset().top; 60 const headerMainH = headerMain.outerHeight(); 61 62 jQuery(window).on('scroll', function () { 63 const scrollTop = jQuery(window).scrollTop(); 64 if (scrollTop >= headerMainOffsetTop) { 65 header.addClass('fixed'); 66 jQuery('.wrapper').css('padding-top', headerMainH); 67 } else { 68 header.removeClass('fixed'); 69 jQuery('.wrapper').css('padding-top', ''); 70 } 71 }); 72 } 73 74 // header menu 75 jQuery(document).on('click', '.js-header-btn', function () { 76 const btn = jQuery(this); 77 const contents = btn.next('.header-contents'); 78 const bg = btn.siblings('.header-contents-bg'); 79 80 jQuery('.js-header-btn').not(btn).removeClass('active'); 81 jQuery('.header-contents').not(contents).fadeOut(); 82 jQuery('.header-contents-bg').not(bg).fadeOut(); 83 84 if (btn.hasClass('active')) { 85 btn.removeClass('active'); 86 contents.fadeOut(); 87 bg.fadeOut(); 88 } else { 89 btn.addClass('active'); 90 contents.fadeIn(); 91 bg.fadeIn(); 92 } 93 }); 94 jQuery(document).on('click', '.header-contents-bg', function () { 95 jQuery('.js-header-btn').removeClass('active'); 96 jQuery('.header-contents').fadeOut(); 97 jQuery('.header-contents-bg').fadeOut(); 98 }); 99 100 // ãã¦ã¹ã§ãã©ãã°ã§ããããã« 101 jQuery.prototype.draggable = function () { 102 var t; 103 jQuery(this).each(function (i, e) { 104 jQuery(e).mousedown(function (e2) { 105 e2.preventDefault(); 106 t = jQuery(e); 107 jQuery(e).data({ 108 down: true, 109 x: e2.clientX, 110 y: e2.clientY, 111 left: jQuery(e).scrollLeft(), 112 top: jQuery(e).scrollTop() 113 }); 114 }); 115 }); 116 jQuery(document).mousemove(function (e) { 117 if (jQuery(t).data('down')) { 118 e.preventDefault(); 119 jQuery(t).scrollLeft(jQuery(t).data('x') + jQuery(t).data('left') - e.clientX); 120 jQuery(t).scrollTop(jQuery(t).data('y') + jQuery(t).data('top') - e.clientY); 121 } 122 }).mouseup(function (e) { 123 jQuery(t).data('down', false); 124 }); 125 }; 126 127 // å·¦ã¡ãã¥ã¼åè¦ç´ ãªãã®å ´åã¯é表示 128 if ((jQuery('.pane-left-menu').length > 0) && (jQuery('.pane-left-menu').find('#block_of_filter').length === 0)) { 129 function isEmpty(element) { 130 return jQuery.trim(element.html()) === ''; 131 } 132 133 const leftMenu = jQuery('.pane-left-menu'); 134 const leftTop = isEmpty(leftMenu.find('.block-left-menu-top')); 135 const leftMiddle = isEmpty(leftMenu.find('.block-left-menu-middle')); 136 const leftBottom = isEmpty(leftMenu.find('.block-left-menu-bottom')); 137 138 if (leftTop && leftMiddle && leftBottom) { 139 leftMenu.hide(); 140 } 141 } 142 143 // ã«ãã´ãªãã¼ã¸ã»ã¸ã£ã³ã«ãã¼ã¸ 144 if ((jQuery('.block-category-list').length > 0) || (jQuery('.block-genre-page').length > 0)) { 145 146 if (jQuery('.block-category-list').length > 0) { 147 // ã¿ã¤ãã«ãåã«ãã´ãªãä¸ã«ç§»å 148 jQuery('.pane-contents>.container').prepend(jQuery('.block-category-list--sub')).prepend(jQuery('[class*="block-category-list--header"]')); 149 150 // åã«ãã´ãªãã¢ã³ã¼ãã£ãªã³ã«å¤æ´ 151 const categoryList = jQuery('.block-category-list--sub'); 152 const categoryContents = categoryList.children(); 153 154 if (categoryContents.length > 0) { 155 categoryContents.wrapAll('<div class="block-category-list--container"></div>'); 156 categoryList.prepend('<button class="block-category-list--button
156js-accordion" type="button">ã«ãã´ãªä¸è¦§</button>'); 157 categoryList.find('.block-category-list--container').hide(); 158 } 159 } 160 161 if (jQuery('.block-genre-page').length > 0) { 162 // ã¿ã¤ãã«ãåã¸ã£ã³ã«ãä¸ã«ç§»å 163 jQuery('.pane-contents>.container').prepend(jQuery('.block-genre-style')).prepend(jQuery('[class*="block-genre-page--header"]')); 164 165 // åã¸ã£ã³ã«ãã¢ã³ã¼ãã£ãªã³ã«å¤æ´ 166 const genreList = jQuery('.block-genre-style'); 167 const genreItem = genreList.children('.block-genre-style--item'); 168 169 if (genreItem.length > 0) { 170 genreItem.wrapAll('<div class="block-genre-style--container"><div class="block-genre-style--items"></div></div>'); 171 genreList.prepend('<button class="block-genre-style--button js-accordion" type="button">ã¸ã£ã³ã«ä¸è¦§</button>'); 172 genreList.find('.block-genre-style--container').hide(); 173 } 174 } 175 176 jQuery('.pane-contents').addClass('is-show'); 177 } 178 179 // çµãè¾¼ã¿å夿´ 180 if (jQuery('.block-filter--header').length > 0) { 181 jQuery('.block-filter--header').text('çµãè¾¼ã¿'); 182 } 183 184 // ä¸¦ã³æ¿ãã»è¡¨ç¤ºæ¹æ³ 185 const sort = jQuery('.block-goods-list--sort-order-items'); 186 const display = jQuery('.block-goods-list--display-style-items'); 187 if ((sort.length > 0) || (display.length > 0)) { 188 // ä¸¦ã³æ¿ãã»è¡¨ç¤ºæ¹æ³ãã¾ã¨ãã 189 if (!jQuery(".block-goods-list--frame").length > 0) { 190 const frame = jQuery('<div class="block-goods-list--frame"></div>'); 191 if (display.length > 0) { 192 display.before(frame); 193 } else if (sort.length > 0) { 194 sort.before(frame); 195 } else if (jQuery(".block-goods-list--pager-top").length > 0) { 196 jQuery(".block-goods-list--pager-top").before(frame); 197 } 198 frame.append(sort).append(jQuery('.block-goods-list--pager-top')).append(display); 199 } 200 201 // ä¸¦ã³æ¿ã 202 if (sort.length > 0) { 203 jQuery('.block-goods-list--sort-order-items dt').html('<span>ä¸¦ã³æ¿ã</span>'); 204 } 205 jQuery(document).on('click', '.block-goods-list--sort-order-items dt', function () { 206 jQuery(this).closest('.block-goods-list--sort-order-items').toggleClass('active'); 207 }); 208 209 // è¡¨ç¤ºæ¹æ³ã«ã¯ã©ã¹ä»ä¸ 210 display.find('dd').each(function () { 211 var text = jQuery(this).text(); 212 if (text == 'åå詳細') { jQuery(this).addClass('is-thumbnail'); } 213 if (text == 'ããã¯ã¢ãã(1å)') { jQuery(this).addClass('is-pickup'); } 214 }); 215 } 216 217 // æè¿ãã§ãã¯ããåå 218 if (jQuery('#block_of_itemhistory').length > 0) { 219 const target = jQuery('#block_of_itemhistory'); 220 const observer = new MutationObserver(() => { 221 setTimeout(() => { 222 observer.disconnect(); 223 224 if (target.find('.block-recent-item--header').length > 0) { 225 target.find('.block-recent-item--header').text('æè¿ãã§ãã¯ããåå'); 226 } 227 if (target.find('.block-recent-item--items ul li').length > 8) { 228 const slider = target.find('.block-recent-item--items'); 229 if (slider.siblings('.swiper-button-prev').length === 0 && slider.siblings('.swiper-button-next').length === 0) { 230 slider.after('<div class="swiper-button-prev"></div><div class="swiper-button-next"></div>'); 231 } 232 slider.addClass('swiper'); 233 slider.find('ul').addClass('swiper-wrapper'); 234 slider.find('li').addClass('swiper-slide'); 235 new Swiper(slider[0], { 236 loop: false, 237 speed: 600, 238 slidesPerView: 8, 239 spaceBetween: 30, 240 navigation: { 241 nextEl: slider.siblings('.swiper-button-next')[0], 242 prevEl: slider.siblings('.swiper-button-prev')[0], 243 }, 244 }); 245 } 246 }, 100); 247 }); 248 observer.observe(target[0], { 249 childList: true, 250 subtree: true 251 }); 252 } 253 254 // Aireco slider 6åå 255 if (jQuery('.js-recommend-slider-06').length > 0) { 256 const target = jQuery('.js-recommend-slider-06'); 257 const observer = new MutationObserver(() => { 258 observer.disconnect(); 259 const slider = target.find('.block-thumbnail-t'); 260 if (target.find('.block-thumbnail-t li dl').length <= 6) { 261 slider.addClass('swiper-disabled'); 262 } else { 263 slider.after('<div class="swiper-button-prev"></div><div class="swiper-button-next"></div>'); 264 new Swiper(slider[0], { 265 loop: false, 266 speed: 600,
267 slidesPerView: 6, 268 spaceBetween: 30, 269 navigation: { 270 nextEl: slider.siblings('.swiper-button-next')[0], 271 prevEl: slider.siblings('.swiper-button-prev')[0], 272 }, 273 }); 274 } 275 }) 276 observer.observe(target[0], { 277 childList: true, 278 }) 279 } 280 281 // AiReco slider 3åå 282 if (jQuery('.js-recommend-slider-03').length > 0) { 283 const target = jQuery('.js-recommend-slider-03'); 284 const observer = new MutationObserver(() => { 285 observer.disconnect(); 286 const slider = target.find('.block-thumbnail-t'); 287 if (target.find('.block-thumbnail-t li dl').length <= 3) { 288 slider.addClass('swiper-disabled'); 289 } else { 290 slider.after('<div class="swiper-button-prev"></div><div class="swiper-button-next"></div>'); 291 new Swiper(slider[0], { 292 loop: false, 293 speed: 600, 294 slidesPerView: 3, 295 spaceBetween: 30, 296 navigation: { 297 nextEl: slider.siblings('.swiper-button-next')[0], 298 prevEl: slider.siblings('.swiper-button-prev')[0], 299 }, 300 }); 301 } 302 }) 303 observer.observe(target[0], { 304 childList: true, 305 }) 306 } 307 308 // é»è©±ã§æ³¨æ 309 if (jQuery('.js-tel-link').length > 0) { 310 const phoneNumber = '0120-587-911'; 311 jQuery('.js-tel-link').attr('href', 'tel:' + phoneNumber.replace(/-/g, '')); 312 jQuery('.js-tel-link').find('.number').text(phoneNumber); 313 } 314 315 // ã«ã¼ã 316 if (jQuery('.block-cart').length > 0) { 317 // ã¬ã¤ã¢ã¦ã夿´ 318 jQuery('.block-cart--goods-list li').each(function () { 319 const item = jQuery(this); 320 const frame = jQuery('<div class="block-cart--goods-list-container"></div>'); 321 const icon = item.children('.block-icon'); 322 const name = item.children('.block-cart--goods-list-item'); 323 const price = item.children('.block-cart--goods-list-item-price-info'); 324 const input = item.children('.block-cart--goods-list-item-input'); 325 jQuery(this).children('a').after(frame); 326 frame.append(name).append(price).append(icon).append(input); 327 328 // ååã³ã¼ã追å 329 // const code = item.find('input[name^="rowgoods"]').val(); 330 // const codeHtml = ` 331 // <dl class="block-cart--goods-list-item-code"> 332 // <dt>ååã³ã¼ã</dt> 333 // <dd>${code}</dd> 334 // </dl> 335 // `; 336 // price.after(codeHtml); 337 }); 338 339 // æè¿ãã§ãã¯ããåå 340 if (jQuery('#cart_itemhistory').length > 0) { 341 const target = jQuery('#cart_itemhistory'); 342 const observer = new MutationObserver(() => { 343 setTimeout(() => { 344 observer.disconnect(); 345 jQuery('.block-cart .block-goods-list-c ul').draggable(); 346 }, 100); 347 }); 348 observer.observe(target[0], { 349 childList: true, 350 subtree: true 351 }); 352 } 353 } 354}); 355 356jQuery(window).on('scroll resize', function () { 357 if (jQuery(this).scrollTop() > 120) { 358 jQuery('#footer_pagetop').show(); 359 } else if (jQuery(this).scrollTop() < 80) { 360 jQuery('#footer_pagetop').hide(); 361 } 362});
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.